|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2017 PHP 7.0.16
+- OpenSSL:
+ . Fixed bug #71519 (add serial hex to return value array). (xrobau)
+
- Phar:
. Fixed bug #70417 (PharData::compress() doesn't close temp file). (cmb)
-- ZIP:
- . Fixed bug #70103 (ZipArchive::addGlob ignores remove_all_path option). (cmb)
-
- Session:
. Fixed bug #69582 (session not readable by root in CLI). (EvgeniySpinov)
- Standard:
. Fixed bug #69442 (closing of fd incorrect when PTS enabled). (jaytaph)
+- ZIP:
+ . Fixed bug #70103 (ZipArchive::addGlob ignores remove_all_path option). (cmb)
+
19 Jan 2017 PHP 7.0.15
- Core:
char *extname;
BIO *bio_out;
BUF_MEM *bio_buf;
+ char * hexserial;
char buf[256];
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &zcert, &useshortnames) == FAILURE) {
add_assoc_string(return_value, "serialNumber", i2s_ASN1_INTEGER(NULL, X509_get_serialNumber(cert)));
+ /* Return the hex representation of the serial number, as defined by OpenSSL */
+ hexserial = BN_bn2hex(ASN1_INTEGER_to_BN(X509_get_serialNumber(cert), NULL));
+
+ /* If we received null back from BN_bn2hex, there was a critical error in openssl,
+ * and we should not continue.
+ */
+ if (!hexserial) {
+ RETURN_FALSE;
+ }
+ add_assoc_string(return_value, "serialNumberHex", hexserial);
+ OPENSSL_free(hexserial);
+
add_assoc_asn1_string(return_value, "validFrom", X509_get_notBefore(cert));
add_assoc_asn1_string(return_value, "validTo", X509_get_notAfter(cert));
var_dump(openssl_x509_parse($cert, false));
?>
--EXPECTF--
-array(15) {
+array(16) {
["name"]=>
string(96) "/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net"
["subject"]=>
int(2)
["serialNumber"]=>
string(20) "12593567369101004962"
+ ["serialNumberHex"]=>
+ string(16) "AEC556CC723750A2"
["validFrom"]=>
string(13) "080630102843Z"
["validTo"]=>
string(7) "CA:TRUE"
}
}
-array(15) {
+array(16) {
["name"]=>
string(96) "/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net"
["subject"]=>
int(2)
["serialNumber"]=>
string(20) "12593567369101004962"
+ ["serialNumberHex"]=>
+ string(16) "AEC556CC723750A2"
["validFrom"]=>
string(13) "080630102843Z"
["validTo"]=>