Closed JChrist closed 2 years ago
I think you will need to step through this with a debugger. It seems like some sequence is not delimited correctly.
I assume you have tried different certs, to rule out an issue with the cert itself?
When parsing this with asn1 from pointycastle, it returns the 3 OIDs exactly as expected, this is what made me think there's something wrong with asn1lib.
@JChrist Better late than never, but I just pushed v1.2.1 which fixes your test case.
Trying to parse the extKeyUsage OIDs of a key, I attempt to re-parse the OCTET STRING in order to get the sequence of the contained OIDs. However, one of the resulting OIDs is invalid, it seems to carry extra characters.
The public key I'm trying to parse is the one specified here. The PEM encoded string is the one under the field
CERTIFICATE
.Examining the key online here shows that it contains 3 OIDs under
extKeyUsage
A sample test case to demonstrate this is:
This test will fail on the second expectation, with: