net-misc/freerdp: another libressl fix
authorMike Gilbert <floppym@gentoo.org>
Sun, 29 Sep 2019 20:48:11 +0000 (16:48 -0400)
committerMike Gilbert <floppym@gentoo.org>
Sun, 29 Sep 2019 20:48:11 +0000 (16:48 -0400)
Closes: https://bugs.gentoo.org/684294
Package-Manager: Portage-2.3.75_p7, Repoman-2.3.17_p49
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
net-misc/freerdp/files/2.0.0-rc4-libressl.patch

index f666e0d4d6715163918cdd5bb2b5d6f8b4004876..fd6e6148607a37b6b7aa4fba185f7bd5609db4f3 100644 (file)
@@ -45,3 +45,34 @@ index 76f51701fe..ded41f127e 100644
        SSL_CTX_set_security_level(tls->ctx, settings->TlsSecLevel);
  #endif
  
+From 0c83efa753d0457eb319624f87b491badf75105f Mon Sep 17 00:00:00 2001
+From: Armin Novak <armin.novak@thincast.com>
+Date: Mon, 7 Jan 2019 14:18:14 +0100
+Subject: [PATCH] Fix #5170: Disable custom TLS alert for libressl > 2.8.3
+
+---
+ libfreerdp/crypto/tls.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c
+index b2cf5416c8..56e16bacb4 100644
+--- a/libfreerdp/crypto/tls.c
++++ b/libfreerdp/crypto/tls.c
+@@ -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;
+ }