summaryrefslogtreecommitdiffstats
path: root/common/rfb/Security.cxx
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2010-07-20 15:16:10 +0000
committerAdam Tkac <atkac@redhat.com>2010-07-20 15:16:10 +0000
commit707d361a503718f0636bc50fde56d46fb9edc980 (patch)
tree5d28daa3a5adb4937a83d09976ebb11c2dd39138 /common/rfb/Security.cxx
parent814fa8972e130777d2465d63f57ac7029e2d9ec1 (diff)
downloadtigervnc-707d361a503718f0636bc50fde56d46fb9edc980.tar.gz
tigervnc-707d361a503718f0636bc50fde56d46fb9edc980.zip
[Development] Create VeNCrypt security types in Security class.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4103 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/Security.cxx')
-rw-r--r--common/rfb/Security.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx
index 4dea41ea..e6a51bcc 100644
--- a/common/rfb/Security.cxx
+++ b/common/rfb/Security.cxx
@@ -28,15 +28,19 @@
#define strcasecmp _stricmp
#endif
#include <rfb/CSecurityNone.h>
+#include <rfb/CSecurityStack.h>
#include <rfb/CSecurityVeNCrypt.h>
#include <rfb/CSecurityVncAuth.h>
#include <rdr/Exception.h>
#include <rfb/LogWriter.h>
#include <rfb/Security.h>
#include <rfb/SSecurityNone.h>
+#include <rfb/SSecurityStack.h>
#include <rfb/SSecurityVncAuth.h>
-#ifdef HAVE_GNUTLS
#include <rfb/SSecurityVeNCrypt.h>
+#ifdef HAVE_GNUTLS
+#include <rfb/CSecurityTLS.h>
+#include <rfb/SSecurityTLS.h>
#endif
#include <rfb/util.h>
@@ -116,8 +120,12 @@ SSecurity* Security::GetSSecurity(U32 secType)
switch (secType) {
case secTypeNone: return new SSecurityNone();
case secTypeVncAuth: return new SSecurityVncAuth();
-#ifdef HAVE_GNUTLS
case secTypeVeNCrypt: return new SSecurityVeNCrypt(this);
+#ifdef HAVE_GNUTLS
+ case secTypeTLSNone:
+ return new SSecurityStack(secTypeTLSNone, new SSecurityTLS());
+ case secTypeTLSVnc:
+ return new SSecurityStack(secTypeTLSVnc, new SSecurityTLS(), new SSecurityVncAuth());
#endif
}
@@ -135,8 +143,14 @@ CSecurity* Security::GetCSecurity(U32 secType)
switch (secType) {
case secTypeNone: return new CSecurityNone();
case secTypeVncAuth: return new CSecurityVncAuth();
-#ifdef HAVE_GNUTLS
case secTypeVeNCrypt: return new CSecurityVeNCrypt(this);
+#ifdef HAVE_GNUTLS
+ case secTypeTLSNone:
+ return new CSecurityStack(secTypeTLSNone, "TLS with no password",
+ new CSecurityTLS());
+ case secTypeTLSVnc:
+ return new CSecurityStack(secTypeTLSVnc, "TLS with VNCAuth",
+ new CSecurityTLS(), new CSecurityVncAuth());
#endif
}