From e0b085d03a070f32f42bfec31819cfed41e403b5 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 4 Aug 2021 15:15:26 +0200 Subject: [PATCH] Fix #81327: Error build openssl extension on php 7.4.22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recent fix for bug 52093 is not compatible with LibreSSL ≥ 2.7.0, which we recognize as mostly OpenSSL 1.1.0 compatible, but they still do not support `ASN1_INTEGER_set_int64()`. --- ext/openssl/openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 4af09b0e0f1cc..aa819be42242f 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -3524,7 +3524,7 @@ PHP_FUNCTION(openssl_csr_sign) goto cleanup; } -#if PHP_OPENSSL_API_VERSION >= 0x10100 +#if PHP_OPENSSL_API_VERSION >= 0x10100 && !defined (LIBRESSL_VERSION_NUMBER) ASN1_INTEGER_set_int64(X509_get_serialNumber(new_cert), serial); #else ASN1_INTEGER_set(X509_get_serialNumber(new_cert), serial);