From b3e60c6a1aee8ebdce21642359642d97ddee46e1 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 20 Jul 2010 15:10:59 +0000 Subject: [PATCH] [Development] Support VeNCrypt Security types in standard security type parser. Signed-off-by: Martin Koegler git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4098 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/rfb/Security.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx index 063e5dd1..6175ec1c 100644 --- a/common/rfb/Security.cxx +++ b/common/rfb/Security.cxx @@ -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]"; } } -- 2.39.5