]> source.dussan.org Git - tigervnc.git/commitdiff
[Development] Pass Security instance to {C,S}SecurityVeNCrypt.
authorAdam Tkac <atkac@redhat.com>
Tue, 20 Jul 2010 15:14:08 +0000 (15:14 +0000)
committerAdam Tkac <atkac@redhat.com>
Tue, 20 Jul 2010 15:14:08 +0000 (15:14 +0000)
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4101 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/CSecurityVeNCrypt.cxx
common/rfb/CSecurityVeNCrypt.h
common/rfb/SSecurityVeNCrypt.cxx
common/rfb/SSecurityVeNCrypt.h
common/rfb/Security.cxx

index 87b81b60e179750ad46ee2de33649b8eb58ca6e2..94af48d558e34f351887508dbaeaaadefb366a70 100644 (file)
@@ -39,7 +39,7 @@ using namespace std;
 \r
 static LogWriter vlog("CVeNCrypt");\r
 \r
-CSecurityVeNCrypt::CSecurityVeNCrypt(void) : csecurity(NULL)\r
+CSecurityVeNCrypt::CSecurityVeNCrypt(Security* sec) : csecurity(NULL), security(sec)\r
 {\r
   haveRecvdMajorVersion = false;\r
   haveRecvdMinorVersion = false;\r
index 7280546a5ba2675c9c5a61afe37cee43cbd9ec87..3ad6eb2ca3533b88e0a526759278102c62947a69 100644 (file)
@@ -35,7 +35,7 @@ namespace rfb {
   class CSecurityVeNCrypt : public CSecurity {\r
   public:\r
 \r
-    CSecurityVeNCrypt(void);\r
+    CSecurityVeNCrypt(Security* sec);\r
     ~CSecurityVeNCrypt();\r
     virtual bool processMsg(CConnection* cc);// { return true; }\r
     int getType() const {return chosenType;}\r
@@ -46,6 +46,7 @@ namespace rfb {
     static CSecurityStack* getCSecurityStack(int secType);\r
 \r
     CSecurity *csecurity;\r
+    Security *security;\r
     bool haveRecvdMajorVersion;\r
     bool haveRecvdMinorVersion;\r
     bool haveSentVersion;\r
index b13659982ed2dad7b17b4ed66e6e4e18eed0abbb..894118db284bfd5f0a0be07fa418fbea34cb8620 100644 (file)
@@ -60,7 +60,7 @@ StringParameter SSecurityVeNCrypt::secTypesStr
  "TLSVnc, TLSPlain, X509None, X509Vnc, X509Plain)",\r
  "TLSVnc,TLSPlain,X509Vnc,X509Plain");\r
 \r
-SSecurityVeNCrypt::SSecurityVeNCrypt(void)\r
+SSecurityVeNCrypt::SSecurityVeNCrypt(Security *sec) : security(sec)\r
 {\r
   ssecurity = NULL;\r
   haveSentVersion = false;\r
index cbbcb7fe487e1cab55df305690f5b003003aa850..1fd6b4a0fa844a0a017c97de4fec86bebf60b8fa 100644 (file)
@@ -40,7 +40,7 @@ namespace rfb {
 \r
   class SSecurityVeNCrypt : public SSecurity {\r
   public:\r
-    SSecurityVeNCrypt(void);\r
+    SSecurityVeNCrypt(Security *sec);\r
     ~SSecurityVeNCrypt();\r
     virtual bool processMsg(SConnection* sc);// { return true; }\r
     virtual int getType() const { return secTypeVeNCrypt; }\r
@@ -57,6 +57,7 @@ namespace rfb {
     static SSecurityStack* getSSecurityStack(int secType);\r
 \r
     SSecurity *ssecurity;\r
+    Security *security;\r
     bool haveSentVersion, haveRecvdMajorVersion, haveRecvdMinorVersion;\r
     bool haveSentTypes, haveChosenType;\r
     rdr::U8 majorVersion, minorVersion, numTypes;\r
index cc4889a7bc96e1fae10d76c720a3884bd519250d..4dea41ea78445a4202b123c6a1b71c974f8d8e24 100644 (file)
@@ -117,7 +117,7 @@ SSecurity* Security::GetSSecurity(U32 secType)
   case secTypeNone: return new SSecurityNone();
   case secTypeVncAuth: return new SSecurityVncAuth();
 #ifdef HAVE_GNUTLS
-  case secTypeVeNCrypt: return new SSecurityVeNCrypt();
+  case secTypeVeNCrypt: return new SSecurityVeNCrypt(this);
 #endif
   }
 
@@ -136,7 +136,7 @@ CSecurity* Security::GetCSecurity(U32 secType)
   case secTypeNone: return new CSecurityNone();
   case secTypeVncAuth: return new CSecurityVncAuth();
 #ifdef HAVE_GNUTLS
-  case secTypeVeNCrypt: return new CSecurityVeNCrypt();
+  case secTypeVeNCrypt: return new CSecurityVeNCrypt(this);
 #endif
   }