]> source.dussan.org Git - tigervnc.git/commitdiff
[Development] Support VeNCrypt Security types in standard security type parser.
authorAdam Tkac <atkac@redhat.com>
Tue, 20 Jul 2010 15:10:59 +0000 (15:10 +0000)
committerAdam Tkac <atkac@redhat.com>
Tue, 20 Jul 2010 15:10:59 +0000 (15:10 +0000)
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4098 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/Security.cxx

index 063e5dd1c953898cfeee7315067eeefb4f2ea907..6175ec1ce7bcc05bd1b0e38d81dcec613f04aa71 100644 (file)
@@ -154,6 +154,17 @@ rdr::U32 rfb::secTypeNum(const char* name)
   if (strcasecmp(name, "SSPI") == 0)       return secTypeSSPI;
   if (strcasecmp(name, "SSPIne") == 0)     return secTypeSSPIne;
   if (strcasecmp(name, "VeNCrypt") == 0)   return secTypeVeNCrypt;
+
+  /* VeNCrypt subtypes */
+  if (strcasecmp(name, "TLSNone") == 0)    return secTypeTLSNone;
+  if (strcasecmp(name, "TLSVnc") == 0)     return secTypeTLSVnc;
+#if 0 /* Currently not implemented */
+  if (strcasecmp(name, "X509None") == 0)   return secTypeX509None;
+  if (strcasecmp(name, "X509Vnc") == 0)    return secTypeX509Vnc;
+  if (strcasecmp(name, "TLSPlain") == 0)   return secTypeTLSPlain;
+  if (strcasecmp(name, "X509Plain") == 0)  return secTypeX509Plain;
+#endif
+
   return secTypeInvalid;
 }
 
@@ -168,6 +179,17 @@ const char* rfb::secTypeName(rdr::U32 num)
   case secTypeSSPI:       return "SSPI";
   case secTypeSSPIne:     return "SSPIne";
   case secTypeVeNCrypt:   return "VeNCrypt";
+
+  /* VeNCrypt subtypes */
+  case secTypeTLSNone:    return "TLSNone";
+  case secTypeTLSVnc:     return "TLSVnc";
+#if 0 /* Currently not implemented */
+  case secTypePlain:      return "Plain";
+  case secTypeTLSPlain:   return "TLSPlain";
+  case secTypeX509None:   return "X509None";
+  case secTypeX509Vnc:    return "X509Vnc";
+  case secTypeX509Plain:  return "X509Plain";
+#endif
   default:                return "[unknown secType]";
   }
 }