diff options
author | simon <root@simon.home> | 2017-04-21 01:24:56 +0100 |
---|---|---|
committer | simon <watermansrdev@gmail.com> | 2017-06-25 01:07:40 +0100 |
commit | cb4e15c1aecbe283b87e4e97c1d485062ef7f571 (patch) | |
tree | 462fb00816ccf67e418a736de9bb0c39c173e121 /libvncclient/tls_openssl.c | |
parent | c80879ee69bcad51564b8b183f63131934006bf5 (diff) | |
download | libtdevnc-cb4e15c1aecbe283b87e4e97c1d485062ef7f571.tar.gz libtdevnc-cb4e15c1aecbe283b87e4e97c1d485062ef7f571.zip |
Added SASL authentication support
Added SASL support to OpenSSL
Diffstat (limited to 'libvncclient/tls_openssl.c')
-rw-r--r-- | libvncclient/tls_openssl.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libvncclient/tls_openssl.c b/libvncclient/tls_openssl.c index 1b6c986..4f758d0 100644 --- a/libvncclient/tls_openssl.c +++ b/libvncclient/tls_openssl.c @@ -397,6 +397,10 @@ ReadVeNCryptSecurityType(rfbClient* client, uint32_t *result) if (t==rfbVeNCryptTLSNone || t==rfbVeNCryptTLSVNC || t==rfbVeNCryptTLSPlain || +#ifdef LIBVNCSERVER_HAVE_SASL + t==rfbVeNCryptTLSSASL || + t==rfbVeNCryptX509SASL || +#endif /*LIBVNCSERVER_HAVE_SASL */ t==rfbVeNCryptX509None || t==rfbVeNCryptX509VNC || t==rfbVeNCryptX509Plain) @@ -489,6 +493,9 @@ HandleVeNCryptAuth(rfbClient* client) case rfbVeNCryptTLSNone: case rfbVeNCryptTLSVNC: case rfbVeNCryptTLSPlain: +#ifdef LIBVNCSERVER_HAVE_SASL + case rfbVeNCryptTLSSASL: +#endif /* LIBVNCSERVER_HAVE_SASL */ anonTLS = TRUE; break; default: @@ -614,3 +621,14 @@ void FreeTLS(rfbClient* client) SSL_free(client->tlsSession); } +#ifdef LIBVNCSERVER_HAVE_SASL +int GetTLSCipherBits(rfbClient* client) +{ + SSL *ssl = (SSL *)(client->tlsSession); + + const SSL_CIPHER *cipher = SSL_get_current_cipher(ssl); + + return SSL_CIPHER_get_bits(cipher, NULL); +} +#endif /* LIBVNCSERVER_HAVE_SASL */ + |