[Development] Implement *Plain types on the client side.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4127 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx
index 71e45de..874c346 100644
--- a/common/rfb/Security.cxx
+++ b/common/rfb/Security.cxx
@@ -31,6 +31,7 @@
 #include <rfb/CSecurityStack.h>
 #include <rfb/CSecurityVeNCrypt.h>
 #include <rfb/CSecurityVncAuth.h>
+#include <rfb/CSecurityPlain.h>
 #include <rdr/Exception.h>
 #include <rfb/LogWriter.h>
 #include <rfb/Security.h>
@@ -56,7 +57,7 @@
 ("SecurityTypes",
  "Specify which security scheme to use (None, VncAuth)",
 #ifdef HAVE_GNUTLS
- "VeNCrypt,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None",
+ "VeNCrypt,X509Plain,TLSPlain,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None",
 #else
  "VncAuth,None",
 #endif
@@ -172,6 +173,7 @@
   case secTypeNone: return new CSecurityNone();
   case secTypeVncAuth: return new CSecurityVncAuth();
   case secTypeVeNCrypt: return new CSecurityVeNCrypt(this);
+  case secTypePlain: return new CSecurityPlain();
 #ifdef HAVE_GNUTLS
   case secTypeTLSNone:
     return new CSecurityStack(secTypeTLSNone, "TLS with no password",
@@ -179,12 +181,18 @@
   case secTypeTLSVnc:
     return new CSecurityStack(secTypeTLSVnc, "TLS with VNCAuth",
 			      new CSecurityTLS(true), new CSecurityVncAuth());
+  case secTypeTLSPlain:
+    return new CSecurityStack(secTypeTLSPlain, "TLS with Username/Password",
+			      new CSecurityTLS(true), new CSecurityPlain());
   case secTypeX509None:
     return new CSecurityStack(secTypeX509None, "X509 with no password",
 			      new CSecurityTLS(false));
   case secTypeX509Vnc:
     return new CSecurityStack(secTypeX509None, "X509 with VNCAuth",
 			      new CSecurityTLS(false), new CSecurityVncAuth());
+  case secTypeX509Plain:
+    return new CSecurityStack(secTypeX509Plain, "X509 with Username/Password",
+			      new CSecurityTLS(false), new CSecurityPlain());
 #endif
   }