summaryrefslogtreecommitdiffstats
path: root/libvncclient/tls_openssl.c
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 /libvncclient/tls_openssl.c
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 'libvncclient/tls_openssl.c')
-rw-r--r--libvncclient/tls_openssl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libvncclient/tls_openssl.c b/libvncclient/tls_openssl.c
index 2bdf3eb..fe60147 100644
--- a/libvncclient/tls_openssl.c
+++ b/libvncclient/tls_openssl.c
@@ -475,6 +475,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)
@@ -576,6 +580,9 @@ HandleVeNCryptAuth(rfbClient* client)
case rfbVeNCryptTLSNone:
case rfbVeNCryptTLSVNC:
case rfbVeNCryptTLSPlain:
+#ifdef LIBVNCSERVER_HAVE_SASL
+ case rfbVeNCryptTLSSASL:
+#endif /* LIBVNCSERVER_HAVE_SASL */
anonTLS = TRUE;
break;
default:
@@ -679,3 +686,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 */
+