|
|
@@ -29,6 +29,7 @@ |
|
|
|
#include <rfb/CSecurityTLS.h>
|
|
|
|
#include <rfb/CSecurityVeNCrypt.h>
|
|
|
|
#include <rfb/CSecurityVncAuth.h>
|
|
|
|
#include <rfb/LogWriter.h>
|
|
|
|
#include <rfb/SSecurityVeNCrypt.h>
|
|
|
|
#include <list>
|
|
|
|
|
|
|
@@ -36,6 +37,8 @@ using namespace rfb; |
|
|
|
using namespace rdr;
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
static LogWriter vlog("CVeNCrypt");
|
|
|
|
|
|
|
|
CSecurityVeNCrypt::CSecurityVeNCrypt(void) : csecurity(NULL)
|
|
|
|
{
|
|
|
|
haveRecvdMajorVersion = false;
|
|
|
@@ -131,6 +134,9 @@ bool CSecurityVeNCrypt::processMsg(CConnection* cc) |
|
|
|
if (is->checkNoWait(4)) {
|
|
|
|
availableTypes[iAvailableType++] = is->readU32();
|
|
|
|
haveListOfTypes = (iAvailableType >= nAvailableTypes);
|
|
|
|
vlog.debug("Server offers security type %s (%d)",
|
|
|
|
secTypeName(availableTypes[iAvailableType - 1]),
|
|
|
|
availableTypes[iAvailableType - 1]);
|
|
|
|
|
|
|
|
if (!haveListOfTypes)
|
|
|
|
return false;
|
|
|
@@ -161,6 +167,8 @@ bool CSecurityVeNCrypt::processMsg(CConnection* cc) |
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
vlog.debug("Choosing security type %s (%d)", secTypeName(chosenType),
|
|
|
|
chosenType);
|
|
|
|
/* Set up the stack according to the chosen type: */
|
|
|
|
switch (chosenType) {
|
|
|
|
case secTypeTLSNone:
|