You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: org.bouncycastle.asn1.ASN1Exception: invalid OID contents
at org.bouncycastle.provider/org.bouncycastle.asn1.ASN1InputStream.createPrimitiveDERObject(Unknown Source)
at org.bouncycastle.provider/org.bouncycastle.asn1.ASN1InputStream.buildObject(Unknown Source)
at org.bouncycastle.provider/org.bouncycastle.asn1.ASN1InputStream.readObject(Unknown Source)
at org.bouncycastle.provider/org.bouncycastle.asn1.ASN1Primitive.fromByteArray(Unknown Source)
at pro.javacard.globalplatform@23.08.10-SNAPSHOT/pro.javacard.gp.GPData.oid2string(GPData.java:392)
... 36 more
Caused by: java.lang.IllegalArgumentException: invalid OID contents
at org.bouncycastle.provider/org.bouncycastle.asn1.ASN1ObjectIdentifier.createPrimitive(Unknown Source)
... 41 more
This data comes from hardware and can't be changed. Even if incorrect by content, the visualization/parsing is handy. Is this a bug and/or is it possible to invoke parsing without content verification?
The text was updated successfully, but these errors were encountered:
Okay, so the "8000" is the problem - I'm not surprised OpenSSL doesn't like it either - very odd thing for someone to do and definitely a violation of the encoding rules. I've added a system property, "org.bouncycastle.asn1.allow_wrong_oid_enc" which will ignore the specific case of a pointless extension byte.
This used to parse as valid OID with 1.77 with
ASN1ObjectIdentifier.fromByteArray(oid)
:This also matches the result from https://lapo.it/asn1js/#BgkqhkiG_GsEgAA
With 1.78 I get instead:
This data comes from hardware and can't be changed. Even if incorrect by content, the visualization/parsing is handy. Is this a bug and/or is it possible to invoke parsing without content verification?
The text was updated successfully, but these errors were encountered: