summaryrefslogtreecommitdiffstats
path: root/rfb/rfbclient.h
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2017-09-02 17:02:38 +0200
committerChristian Beier <dontmind@freeshell.org>2017-09-02 17:02:38 +0200
commit98e1be528f8c39a5c196ce251338e24bca948d90 (patch)
tree903dcb4bcf92e41c71b7ed41d9533a597b0f2daa /rfb/rfbclient.h
parent1155edec9ecc8eab112d7131f844a911d4aeca8e (diff)
parentcb4e15c1aecbe283b87e4e97c1d485062ef7f571 (diff)
downloadlibtdevnc-98e1be528f8c39a5c196ce251338e24bca948d90.tar.gz
libtdevnc-98e1be528f8c39a5c196ce251338e24bca948d90.zip
Merge branch 'sasl2' of git://github.com/simonwaterman/libvncserver into simonwaterman-sasl2
Diffstat (limited to 'rfb/rfbclient.h')
-rw-r--r--rfb/rfbclient.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index 4ac9cd6..72d672a 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -52,6 +52,10 @@
#include <rfb/rfbproto.h>
#include <rfb/keysym.h>
+#ifdef LIBVNCSERVER_HAVE_SASL
+#include <sasl/sasl.h>
+#endif /* LIBVNCSERVER_HAVE_SASL */
+
#define rfbClientSwap16IfLE(s) \
(*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))
@@ -205,6 +209,11 @@ typedef rfbBool (*GotJpegProc)(struct _rfbClient* client, const uint8_t* buffer,
typedef rfbBool (*LockWriteToTLSProc)(struct _rfbClient* client);
typedef rfbBool (*UnlockWriteToTLSProc)(struct _rfbClient* client);
+#ifdef LIBVNCSERVER_HAVE_SASL
+typedef char* (*GetUserProc)(struct _rfbClient* client);
+typedef char* (*GetSASLMechanismProc)(struct _rfbClient* client, char* mechlist);
+#endif /* LIBVNCSERVER_HAVE_SASL */
+
typedef struct _rfbClient {
uint8_t* frameBuffer;
int width, height;
@@ -399,6 +408,20 @@ typedef struct _rfbClient {
GotBitmapProc GotBitmap;
/** Hook for custom JPEG decoding and rendering */
GotJpegProc GotJpeg;
+
+#ifdef LIBVNCSERVER_HAVE_SASL
+ sasl_conn_t *saslconn;
+ const char *saslDecoded;
+ unsigned int saslDecodedLength;
+ unsigned int saslDecodedOffset;
+ sasl_secret_t *saslSecret;
+
+ /* Callback to allow the client to choose a preferred mechanism. The string returned will
+ be freed once no longer required. */
+ GetSASLMechanismProc GetSASLMechanism;
+ GetUserProc GetUser;
+
+#endif /* LIBVNCSERVER_HAVE_SASL */
} rfbClient;
/* cursor.c */