diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2009-11-02 16:13:26 +0100 |
---|---|---|
committer | Johannes Schindelin <johannes.schindelin@gmx.de> | 2009-11-02 16:13:26 +0100 |
commit | f49a292783407c14869d811c05c2bbd009af27f7 (patch) | |
tree | 5cf5e9544f6762bb67e94e195b882120a40bcf3f /rfb/rfbclient.h | |
parent | 67223b7c4d3411dbc5a311c7b66770f2ac9b7b83 (diff) | |
parent | 29990f0090754c722653aafd3fc6800cebc1584c (diff) | |
download | libtdevnc-f49a292783407c14869d811c05c2bbd009af27f7.tar.gz libtdevnc-f49a292783407c14869d811c05c2bbd009af27f7.zip |
Merge branch 'VeNCrypt'
Diffstat (limited to 'rfb/rfbclient.h')
-rw-r--r-- | rfb/rfbclient.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index aa9d2e4..8d6a184 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -33,6 +33,9 @@ #include <unistd.h> #include <rfb/rfbproto.h> #include <rfb/keysym.h> +#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +#include <gnutls/gnutls.h> +#endif #define rfbClientSwap16IfLE(s) \ (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) @@ -43,6 +46,16 @@ (((l) & 0x0000ff00) << 8) | \ (((l) & 0x000000ff) << 24)) : (l)) +#define rfbClientSwap64IfLE(l) \ + (*(char *)&client->endianTest ? ((((l) & 0xff00000000000000ULL) >> 56) | \ + (((l) & 0x00ff000000000000ULL) >> 40) | \ + (((l) & 0x0000ff0000000000ULL) >> 24) | \ + (((l) & 0x000000ff00000000ULL) >> 8) | \ + (((l) & 0x00000000ff000000ULL) << 8) | \ + (((l) & 0x0000000000ff0000ULL) << 24) | \ + (((l) & 0x000000000000ff00ULL) << 40) | \ + (((l) & 0x00000000000000ffULL) << 56)) : (l)) + #define FLASH_PORT_OFFSET 5400 #define LISTEN_PORT_OFFSET 5500 #define TUNNEL_PORT_OFFSET 5500 @@ -98,6 +111,27 @@ typedef struct { int scaleSetting; /* 0 means no scale set, else 1/scaleSetting */ } AppData; +/* For GetCredentialProc callback function to return */ +typedef union _rfbCredential +{ + /* X509 (VeNCrypt) */ + struct + { + char *x509CACertFile; + char *x509CACrlFile; + char *x509ClientCertFile; + char *x509ClientKeyFile; + } x509Credential; + /* Plain (VeNCrypt), MSLogon (UltraVNC) */ + struct + { + char *username; + char *password; + } userCredential; +} rfbCredential; + +#define rfbCredentialTypeX509 1 +#define rfbCredentialTypeUser 2 struct _rfbClient; @@ -109,6 +143,7 @@ typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client); typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h); typedef void (*FinishedFrameBufferUpdateProc)(struct _rfbClient* client); typedef char* (*GetPasswordProc)(struct _rfbClient* client); +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); @@ -254,6 +289,22 @@ typedef struct _rfbClient { /* negotiated protocol version */ int major, minor; + + /* The selected security types */ + uint32_t authScheme, subAuthScheme; + +#ifdef LIBVNCSERVER_WITH_CLIENT_TLS + /* The TLS session for Anonymous TLS and VeNCrypt */ + gnutls_session_t tlsSession; +#endif + + /* To support security types that requires user input (except VNC password + * authentication), for example VeNCrypt and MSLogon, this callback function + * must be set before the authentication. Otherwise, it implicates that the + * caller application does not support it and related security types should + * be bypassed. + */ + GetCredentialProc GetCredential; } rfbClient; /* cursor.c */ |