Skip to content

Commit

Permalink
Fix #81327: Error build openssl extension on php 7.4.22
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cmb69 committed Aug 4, 2021
1 parent c565555 commit 6724d5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/openssl.c
Expand Up @@ -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);
Expand Down

0 comments on commit 6724d5d

Please sign in to comment.