summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/rfb/SSecurityFactoryStandard.cxx4
-rw-r--r--common/rfb/Security.cxx12
-rw-r--r--common/rfb/Security.h35
-rw-r--r--win/vncconfig/Authentication.h4
4 files changed, 28 insertions, 27 deletions
diff --git a/common/rfb/SSecurityFactoryStandard.cxx b/common/rfb/SSecurityFactoryStandard.cxx
index 01f77bfc..6056a19e 100644
--- a/common/rfb/SSecurityFactoryStandard.cxx
+++ b/common/rfb/SSecurityFactoryStandard.cxx
@@ -65,8 +65,8 @@ void SSecurityFactoryStandard::getSecTypes(std::list<rdr::U8>* secTypes, bool re
secTypesStr.buf = rev_sec_types.getData();
else
secTypesStr.buf = sec_types.getData();
- std::list<int> configured = parseSecTypes(secTypesStr.buf);
- std::list<int>::iterator i;
+ std::list<rdr::U8> configured = parseSecTypes(secTypesStr.buf);
+ std::list<rdr::U8>::iterator i;
for (i=configured.begin(); i!=configured.end(); i++) {
if (isSecTypeSupported(*i))
secTypes->push_back(*i);
diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx
index 830d8444..67acf5c9 100644
--- a/common/rfb/Security.cxx
+++ b/common/rfb/Security.cxx
@@ -22,7 +22,7 @@
#include <rfb/secTypes.h>
#include <rfb/util.h>
-int rfb::secTypeNum(const char* name)
+rdr::U8 rfb::secTypeNum(const char* name)
{
if (strcasecmp(name, "None") == 0) return secTypeNone;
if (strcasecmp(name, "VncAuth") == 0) return secTypeVncAuth;
@@ -34,7 +34,7 @@ int rfb::secTypeNum(const char* name)
return secTypeInvalid;
}
-const char* rfb::secTypeName(int num)
+const char* rfb::secTypeName(rdr::U8 num)
{
switch (num) {
case secTypeNone: return "None";
@@ -48,7 +48,7 @@ const char* rfb::secTypeName(int num)
}
}
-bool rfb::secTypeEncrypts(int num)
+bool rfb::secTypeEncrypts(rdr::U8 num)
{
switch (num) {
case secTypeRA2:
@@ -59,13 +59,13 @@ bool rfb::secTypeEncrypts(int num)
}
}
-std::list<int> rfb::parseSecTypes(const char* types_)
+std::list<rdr::U8> rfb::parseSecTypes(const char* types_)
{
- std::list<int> result;
+ std::list<rdr::U8> result;
CharArray types(strDup(types_)), type;
while (types.buf) {
strSplit(types.buf, ',', &type.buf, &types.buf);
- int typeNum = secTypeNum(type.buf);
+ rdr::U8 typeNum = secTypeNum(type.buf);
if (typeNum != secTypeInvalid)
result.push_back(typeNum);
}
diff --git a/common/rfb/Security.h b/common/rfb/Security.h
index 3cf783bd..d890d560 100644
--- a/common/rfb/Security.h
+++ b/common/rfb/Security.h
@@ -22,33 +22,34 @@
#ifndef __RFB_SECTYPES_H__
#define __RFB_SECTYPES_H__
+#include <rdr/types.h>
#include <list>
namespace rfb {
- const int secTypeInvalid = 0;
- const int secTypeNone = 1;
- const int secTypeVncAuth = 2;
+ const rdr::U8 secTypeInvalid = 0;
+ const rdr::U8 secTypeNone = 1;
+ const rdr::U8 secTypeVncAuth = 2;
- const int secTypeRA2 = 5;
- const int secTypeRA2ne = 6;
+ const rdr::U8 secTypeRA2 = 5;
+ const rdr::U8 secTypeRA2ne = 6;
- const int secTypeSSPI = 7;
- const int secTypeSSPIne = 8;
+ const rdr::U8 secTypeSSPI = 7;
+ const rdr::U8 secTypeSSPIne = 8;
- const int secTypeTight = 16;
- const int secTypeUltra = 17;
- const int secTypeTLS = 18;
+ const rdr::U8 secTypeTight = 16;
+ const rdr::U8 secTypeUltra = 17;
+ const rdr::U8 secTypeTLS = 18;
// result types
- const int secResultOK = 0;
- const int secResultFailed = 1;
- const int secResultTooMany = 2; // deprecated
+ const rdr::U32 secResultOK = 0;
+ const rdr::U32 secResultFailed = 1;
+ const rdr::U32 secResultTooMany = 2; // deprecated
- const char* secTypeName(int num);
- int secTypeNum(const char* name);
- bool secTypeEncrypts(int num);
- std::list<int> parseSecTypes(const char* types);
+ const char* secTypeName(rdr::U8 num);
+ rdr::U8 secTypeNum(const char* name);
+ bool secTypeEncrypts(rdr::U8 num);
+ std::list<rdr::U8> parseSecTypes(const char* types);
}
#endif
diff --git a/win/vncconfig/Authentication.h b/win/vncconfig/Authentication.h
index f4b38f8c..24b71038 100644
--- a/win/vncconfig/Authentication.h
+++ b/win/vncconfig/Authentication.h
@@ -40,10 +40,10 @@ namespace rfb {
: PropSheetPage(GetModuleHandle(0), MAKEINTRESOURCE(IDD_AUTHENTICATION)), regKey(rk) {}
void initDialog() {
CharArray sec_types_str(SSecurityFactoryStandard::sec_types.getData());
- std::list<int> sec_types = parseSecTypes(sec_types_str.buf);
+ std::list<rdr::U8> sec_types = parseSecTypes(sec_types_str.buf);
useNone = useVNC = false;
- std::list<int>::iterator i;
+ std::list<rdr::U8>::iterator i;
for (i=sec_types.begin(); i!=sec_types.end(); i++) {
if ((*i) == secTypeNone) useNone = true;
else if ((*i) == secTypeVncAuth) useVNC = true;