From 95ae56c83110c35bce9752d18975b6edcd8088b9 Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Fri, 2 Oct 2009 20:42:05 +0800 Subject: Add VeNCrypt support in libvncclient Signed-off-by: Vic Lee --- rfb/rfbclient.h | 9 ++++++--- rfb/rfbproto.h | 10 ++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'rfb') diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index b3a0d87..c32168c 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -104,7 +104,7 @@ typedef struct { /* For GetCredentialProc callback function to return */ typedef union _rfbCredential { - /* VeNCrypt */ + /* X509 (VeNCrypt) */ struct { char *x509CACertFile; @@ -112,7 +112,7 @@ typedef union _rfbCredential char *x509ClientCertFile; char *x509ClientKeyFile; } x509Credential; - /* MSLogon */ + /* Plain (VeNCrypt), MSLogon (UltraVNC) */ struct { char *username; @@ -120,6 +120,9 @@ typedef union _rfbCredential } userCredential; } rfbCredential; +#define rfbCredentialTypeX509 1 +#define rfbCredentialTypeUser 2 + struct _rfbClient; typedef void (*HandleTextChatProc)(struct _rfbClient* client, int value, char *text); @@ -129,7 +132,7 @@ typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client); typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h); typedef char* (*GetPasswordProc)(struct _rfbClient* client); -typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, uint8_t securityType); +typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int credentialType); typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client); typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen); typedef void (*BellProc)(struct _rfbClient* client); diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index fec6bf7..06ab579 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -266,6 +266,16 @@ typedef char rfbProtocolVersionMsg[13]; /* allow extra byte for null */ #define rfbTLS 18 #define rfbVeNCrypt 19 +#define rfbVeNCryptPlain 256 +#define rfbVeNCryptTLSNone 257 +#define rfbVeNCryptTLSVNC 258 +#define rfbVeNCryptTLSPlain 259 +#define rfbVeNCryptX509None 260 +#define rfbVeNCryptX509VNC 261 +#define rfbVeNCryptX509Plain 262 +#define rfbVeNCryptX509SASL 263 +#define rfbVeNCryptTLSSASL 264 + /* * rfbConnFailed: For some reason the connection failed (e.g. the server * cannot support the desired protocol version). This is -- cgit v1.1