[Spice-devel] [PATCH spice-common] ssl_verify: Fix build for newer LibreSSL

Frediano Ziglio fziglio at redhat.com
Thu Jun 21 05:45:57 UTC 2018


LibreSSL 2.7 does not define ASN1_STRING_get0_data, like OpenSSL 1.1.
This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229044.
Original patch from Piotr Kubaj.

Reported-by: Jack L. <xxjack12xx at gmail.com>
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 common/ssl_verify.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/ssl_verify.c b/common/ssl_verify.c
index 27aa5d3..0ac00a6 100644
--- a/common/ssl_verify.c
+++ b/common/ssl_verify.c
@@ -33,7 +33,8 @@
 #include <string.h>
 #include <gio/gio.h>
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined (LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || \
+    (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
 static const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1)
 {
     return M_ASN1_STRING_data(asn1);
-- 
2.17.1



More information about the Spice-devel mailing list