What steps will reproduce the problem?
1. Get a comodo S/MIME certificate
2. Send OCSP request
3. Check in Wireshark and view that the serialNumber differs:
Openssl binary
serialNumber : 0x00aa67d5bb73bf2af0cc7034aac1159283
The serial number the nemid library sends is:
serialNumber : 0xaa67d5bb73bf2af0cc7034aac1159283
Editing d2i in Ocsp.php actually "fixes" the issue, by padding two zeros.
private function d2i($d)
{
$der = '';
$dd = $d;
while ($d) {
$der .= chr(bcmod($d, 256));
$d = bcdiv($d, 256, 0);
}
$der = $der . chr(bcmod(0,256)). chr(bcmod(0, 256)) ;
return "\x02" . $this->len($der) . strrev($der);
}
Original issue reported on code.google.com by
je...@vdwaa.nlon 3 Dec 2014 at 11:19