The stacktrace would seem to indicate that libssl indeed returned a null string here, from i2s_ASN1_INTEGER(NULL, X509_get_serialNumber(cert))
Relevant php7.0 code here:
https://github.com/php/php-src/blob/f13fd9e72a13e80512f6c8b2302e42d4f252c479/ext/openssl/openssl.c#L2295
The stacktrace would seem to indicate that libssl indeed returned a null string here, from i2s_ASN1_ INTEGER( NULL, X509_get_ serialNumber( cert))
Relevant php7.0 code here:
https:/ /github. com/php/ php-src/ blob/f13fd9e72a 13e80512f6c8b23 02e42d4f252c479 /ext/openssl/ openssl. c#L2295