From f7735c48de7b71835aa191e5d5fb3dd0d166661e Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Sun, 20 Oct 2024 21:39:36 +0200 Subject: [PATCH] libvncclient: tls_openssl: fix connection setup w/ newer LibreSSL This needs the security level setting as well. re https://github.com/bk138/multivnc/issues/245 --- src/libvncclient/tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libvncclient/tls_openssl.c b/src/libvncclient/tls_openssl.c index a858f751b..664aafd87 100644 --- a/src/libvncclient/tls_openssl.c +++ b/src/libvncclient/tls_openssl.c @@ -329,7 +329,8 @@ open_ssl_connection (rfbClient *client, int sockfd, rfbBool anonTLS, rfbCredenti } else { /* anonTLS here */ /* Need anonymous ciphers for anonTLS, see https://github.com/LibVNC/libvncserver/issues/347#issuecomment-597477103 */ SSL_CTX_set_cipher_list(ssl_ctx, "aNULL"); -#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined LIBRESSL_VERSION_NUMBER +#if OPENSSL_VERSION_NUMBER >= 0x10100000L || \ + (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x30600000) /* See https://www.openssl.org/docs/man1.1.0/man3/SSL_set_security_level.html Not specifying 0 here makes LibVNCClient fail connecting to some servers.