Hi, first post to list.

LibreSSL user.

PHP 7.1.0RC5 just needs one minor patch to work with LibreSSL, attached

Justification -

X509_get_signature_nid() was introduced in OpenSSL 1.0.2 but LibreSSL fork is prior to that.

However (and I don't like this) LibreSSL uses a OPENSSL_VERSION_NUMBER defined as 0x20000000L

So have to check for presence of LIBRESSL_VERSION_NUMBER when using functions introduced to OpenSSL after the fork (1.0.1h I think)

Tested building against LibreSSL 2.4.3 on a CentOS 7 system (where OpenSSL has been completely removed) - 7.1.0RC5 compiles and works with that line changed.
diff -ur php-7.1.0RC5.orig/ext/openssl/openssl.c php-7.1.0RC5/ext/openssl/openssl.c
--- php-7.1.0RC5.orig/ext/openssl/openssl.c	2016-10-25 08:23:21.000000000 -0700
+++ php-7.1.0RC5/ext/openssl/openssl.c	2016-10-29 17:02:33.549137954 -0700
@@ -669,7 +669,7 @@
 	return 1;
 }
 
-#if OPENSSL_VERSION_NUMBER < 0x10002000L
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER)
 
 static int X509_get_signature_nid(const X509 *x)
 {

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to