API_Hacienda icon indicating copy to clipboard operation
API_Hacienda copied to clipboard

Fix non-integer `X509SerialNumber` since OpenSSL 1.1.x

Open fdelapena opened this issue 3 years ago • 0 comments

fixes the 'La firma del documento no tiene el Policy Id' validator error message

This happens with BCCR-SINPE certificates, their serial numbers are too long, so they trigger this issue: https://bugs.php.net/bug.php?id=77411

Since PHP 7.x exists serialNumberHex, not affected by this issue, but preferred to keep backwards compatibility for old setups.

Because the number is too long for hexadecimal to decimal conversion (hexdec), added a convenient function not requiring php-bcmath or php-gmp extensions being installed.

fdelapena avatar Jun 17 '22 02:06 fdelapena