|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77411 openssl_x509_parse serialNumber not always integer with OpenSSL version 1.1
Submitted: 2019-01-05 00:29 UTC Modified: -
Avg. Score:3.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:0 (0.0%)
From: korikulum at net dot hr Assigned:
Status: Open Package: OpenSSL related
PHP Version: Irrelevant OS: Ubuntu 14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: korikulum at net dot hr
New email:
PHP Version: OS:


 [2019-01-05 00:29 UTC] korikulum at net dot hr
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:

Expected result:
  string(39) "269913321572441498538983276629377170905"
  string(32) "CB0F6A32FD527F6C0001000056603DD9"

Actual result:
  string(34) "0xCB0F6A32FD527F6C0001000056603DD9"
  string(32) "CB0F6A32FD527F6C0001000056603DD9"


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 23 11:01:24 2020 UTC