Fix #5170: Disable custom TLS alert for libressl > 2.8.3
authorArmin Novak <armin.novak@thincast.com>
Mon, 7 Jan 2019 13:18:14 +0000 (14:18 +0100)
committerArmin Novak <armin.novak@thincast.com>
Mon, 7 Jan 2019 13:20:16 +0000 (14:20 +0100)
libfreerdp/crypto/tls.c

index b2cf541..56e16ba 100644 (file)
@@ -1030,7 +1030,8 @@ BOOL tls_send_alert(rdpTls* tls)
         * FIXME: The following code does not work on OpenSSL > 1.1.0 because the
         *        SSL struct is opaqe now
         */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if (!defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x10100000L)) || \
+       (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER <= 0x2080300fL))
 
        if (tls->alertDescription != TLS_ALERT_DESCRIPTION_CLOSE_NOTIFY)
        {
@@ -1057,7 +1058,6 @@ BOOL tls_send_alert(rdpTls* tls)
                if (tls->ssl->s3->wbuf.left == 0)
                        tls->ssl->method->ssl_dispatch_alert(tls->ssl);
        }
-
 #endif
        return TRUE;
 }