aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2010-07-20 15:14:08 +0000
committerAdam Tkac <atkac@redhat.com>2010-07-20 15:14:08 +0000
commita032593f99497cc9394ca7cfb8b96301100ef7a5 (patch)
treef10d7b7a51b064dfb588c44c4acff408ee7058ba /common
parentdb062b6b518b2807e6cc389c2ff10c5ab18ced29 (diff)
downloadtigervnc-a032593f99497cc9394ca7cfb8b96301100ef7a5.tar.gz
tigervnc-a032593f99497cc9394ca7cfb8b96301100ef7a5.zip
[Development] Pass Security instance to {C,S}SecurityVeNCrypt.
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
Diffstat (limited to 'common')
-rw-r--r--common/rfb/CSecurityVeNCrypt.cxx2
-rw-r--r--common/rfb/CSecurityVeNCrypt.h3
-rw-r--r--common/rfb/SSecurityVeNCrypt.cxx2
-rw-r--r--common/rfb/SSecurityVeNCrypt.h3
-rw-r--r--common/rfb/Security.cxx4
5 files changed, 8 insertions, 6 deletions
diff --git a/common/rfb/CSecurityVeNCrypt.cxx b/common/rfb/CSecurityVeNCrypt.cxx
index 87b81b60..94af48d5 100644
--- a/common/rfb/CSecurityVeNCrypt.cxx
+++ b/common/rfb/CSecurityVeNCrypt.cxx
@@ -39,7 +39,7 @@ using namespace std;
static LogWriter vlog("CVeNCrypt");
-CSecurityVeNCrypt::CSecurityVeNCrypt(void) : csecurity(NULL)
+CSecurityVeNCrypt::CSecurityVeNCrypt(Security* sec) : csecurity(NULL), security(sec)
{
haveRecvdMajorVersion = false;
haveRecvdMinorVersion = false;
diff --git a/common/rfb/CSecurityVeNCrypt.h b/common/rfb/CSecurityVeNCrypt.h
index 7280546a..3ad6eb2c 100644
--- a/common/rfb/CSecurityVeNCrypt.h
+++ b/common/rfb/CSecurityVeNCrypt.h
@@ -35,7 +35,7 @@ namespace rfb {
class CSecurityVeNCrypt : public CSecurity {
public:
- CSecurityVeNCrypt(void);
+ CSecurityVeNCrypt(Security* sec);
~CSecurityVeNCrypt();
virtual bool processMsg(CConnection* cc);// { return true; }
int getType() const {return chosenType;}
@@ -46,6 +46,7 @@ namespace rfb {
static CSecurityStack* getCSecurityStack(int secType);
CSecurity *csecurity;
+ Security *security;
bool haveRecvdMajorVersion;
bool haveRecvdMinorVersion;
bool haveSentVersion;
diff --git a/common/rfb/SSecurityVeNCrypt.cxx b/common/rfb/SSecurityVeNCrypt.cxx
index b1365998..894118db 100644
--- a/common/rfb/SSecurityVeNCrypt.cxx
+++ b/common/rfb/SSecurityVeNCrypt.cxx
@@ -60,7 +60,7 @@ StringParameter SSecurityVeNCrypt::secTypesStr
"TLSVnc, TLSPlain, X509None, X509Vnc, X509Plain)",
"TLSVnc,TLSPlain,X509Vnc,X509Plain");
-SSecurityVeNCrypt::SSecurityVeNCrypt(void)
+SSecurityVeNCrypt::SSecurityVeNCrypt(Security *sec) : security(sec)
{
ssecurity = NULL;
haveSentVersion = false;
diff --git a/common/rfb/SSecurityVeNCrypt.h b/common/rfb/SSecurityVeNCrypt.h
index cbbcb7fe..1fd6b4a0 100644
--- a/common/rfb/SSecurityVeNCrypt.h
+++ b/common/rfb/SSecurityVeNCrypt.h
@@ -40,7 +40,7 @@ namespace rfb {
class SSecurityVeNCrypt : public SSecurity {
public:
- SSecurityVeNCrypt(void);
+ SSecurityVeNCrypt(Security *sec);
~SSecurityVeNCrypt();
virtual bool processMsg(SConnection* sc);// { return true; }
virtual int getType() const { return secTypeVeNCrypt; }
@@ -57,6 +57,7 @@ namespace rfb {
static SSecurityStack* getSSecurityStack(int secType);
SSecurity *ssecurity;
+ Security *security;
bool haveSentVersion, haveRecvdMajorVersion, haveRecvdMinorVersion;
bool haveSentTypes, haveChosenType;
rdr::U8 majorVersion, minorVersion, numTypes;
diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx
index cc4889a7..4dea41ea 100644
--- a/common/rfb/Security.cxx
+++ b/common/rfb/Security.cxx
@@ -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
}