Bug #77411 [NEW]: openssl_x509_parse serialNumber not always integer with OpenSSL version 1.1
| From: | korikulum at net dot hr | Date: | Sat, 05 Jan 2019 00:29:01 +0000 |
| Subject: | Bug #77411 [NEW]: openssl_x509_parse serialNumber not always integer with OpenSSL version 1.1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-218795@lists.php.net to get a copy of this message | ||
From: korikulum at net dot hr
Operating system: Ubuntu 14.04
PHP version: Irrelevant
Package: OpenSSL related
Bug Type: Bug
Bug description:openssl_x509_parse serialNumber not always integer with OpenSSL version 1.1
Description:
------------
With OpenSSL version 1.0 "openssl_x509_parse" would always return
"serialNumber" as a string representation of an integer value, while
"serialNumberHex" would be a string representation of a hexadecimal
number.
This changes when using OpenSSL version 1.1. With OpenSSL version 1.1
the value of "serialNumber" is sometimes (not always) returned as a
string representation of a hexadecimal number instead of an integer.
This is due to the following changes in OpenSSL:
https://github.com/openssl/openssl/commit/10a3195fcf7d04ba519651cf12e945a8fe470a3c
Expected result:
----------------
["serialNumber"]=>
string(39) "269913321572441498538983276629377170905"
["serialNumberHex"]=>
string(32) "CB0F6A32FD527F6C0001000056603DD9"
Actual result:
--------------
["serialNumber"]=>
string(34) "0xCB0F6A32FD527F6C0001000056603DD9"
["serialNumberHex"]=>
string(32) "CB0F6A32FD527F6C0001000056603DD9"
--
Edit bug report at https://bugs.php.net/bug.php?id=77411&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77411&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77411&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77411&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77411&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77411&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77411&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77411&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77411&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77411&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77411&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77411&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77411&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77411&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77411&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77411&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77411&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77411&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77411&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77411&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77411&r=mysqlcfg