diff --git a/src/libvncclient/tls_openssl.c b/src/libvncclient/tls_openssl.c index a858f751..664aafd8 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.