From 6724d5d4c2c502b098e708bd85b43f2a52848093 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()`. Closes GH-7339. --- NEWS | 3 +++ ext/openssl/openssl.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 24a763b37c40e..28341f26c94c6 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,9 @@ PHP NEWS - GD: . Fixed bug #51498 (imagefilledellipse does not work for large circles). (cmb) +- OpenSSL: + . Fixed bug #81327 (Error build openssl extension on php 7.4.22). (cmb) + - PDO_ODBC: . Fixed bug #81252 (PDO_ODBC doesn't account for SQL_NO_TOTAL). (cmb) 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);