aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/SSecurityVeNCrypt.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/SSecurityVeNCrypt.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/SSecurityVeNCrypt.cxx')
-rw-r--r--common/rfb/SSecurityVeNCrypt.cxx27
1 files changed, 1 insertions, 26 deletions
diff --git a/common/rfb/SSecurityVeNCrypt.cxx b/common/rfb/SSecurityVeNCrypt.cxx
index 2dd331e9..c704d1e5 100644
--- a/common/rfb/SSecurityVeNCrypt.cxx
+++ b/common/rfb/SSecurityVeNCrypt.cxx
@@ -26,17 +26,11 @@
#include <config.h>
#endif
-#ifndef HAVE_GNUTLS
-#error "This source should not be compiled without HAVE_GNUTLS defined"
-#endif
-
#include <rfb/SSecurityVeNCrypt.h>
#include <rfb/Exception.h>
#include <rfb/LogWriter.h>
#include <rdr/InStream.h>
#include <rdr/OutStream.h>
-#include <rfb/SSecurityVncAuth.h>
-#include <rfb/SSecurityTLS.h>
using namespace rfb;
using namespace rdr;
@@ -180,29 +174,10 @@ bool SSecurityVeNCrypt::processMsg(SConnection* sc)
if (chosenType == secTypeInvalid || chosenType == secTypeVeNCrypt)
throw AuthFailureException("No valid VeNCrypt sub-type");
- ssecurity = SSecurityVeNCrypt::getSSecurityStack(chosenType);
+ ssecurity = security->GetSSecurity(chosenType);
}
/* continue processing the messages */
return ssecurity->processMsg(sc);
}
-SSecurityStack* SSecurityVeNCrypt::getSSecurityStack(int secType)
-{
- switch (secType) {
- case secTypeTLSNone:
- return new SSecurityStack(secTypeTLSNone, new SSecurityTLS());
- case secTypeTLSVnc:
- return new SSecurityStack(secTypeTLSVnc, new SSecurityTLS(), new SSecurityVncAuth());
-#if 0
- /* Following types are not implemented, yet */
- case secTypeTLSPlain:
- case secTypeX509None:
- case secTypeX509Vnc:
- case secTypeX509Plain:
-#endif
- default:
- throw Exception("Bug in the SSecurityVeNCrypt::getSSecurityStack");
- }
-}
-