Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ PHP 8.6 INTERNALS UPGRADE NOTES
4. OpCode changes
========================

- Added ZEND_TYPE_ASSERT to check a value's type against the parameter
type of a function, throwing a TypeError on failure as if the function
was called. Used in optimizations that elide function calls.

========================
5. SAPI changes
========================
11 changes: 11 additions & 0 deletions ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,11 @@ PHP_FUNCTION(openssl_x509_parse)

subject_name = X509_get_subject_name(cert);
cert_name = X509_NAME_oneline(subject_name, NULL, 0);
if (cert_name == NULL) {
php_openssl_store_errors();
goto err;
}

add_assoc_string(return_value, "name", cert_name);
OPENSSL_free(cert_name);

Expand Down Expand Up @@ -1064,6 +1069,12 @@ PHP_FUNCTION(openssl_x509_parse)
}

str_serial = i2s_ASN1_INTEGER(NULL, asn1_serial);
/* Can return NULL on error or memory allocation failure */
if (!str_serial) {
php_openssl_store_errors();
goto err;
}

add_assoc_string(return_value, "serialNumber", str_serial);
OPENSSL_free(str_serial);

Expand Down