Re: parsing invalid DER

2022-09-01 Thread Viktor Dukhovni
On Thu, Sep 01, 2022 at 08:21:21AM -0400, Dave Coombs via openssl-users wrote: > These are the 2 invalid encodings I have seen: > > First, a bit-string used for flags, encoded as (hex) 030108. That is, > the number of unused bits is set to 8, and no other content, presumably > indicating no flag

Re: parsing invalid DER

2022-09-01 Thread Peter Sylvester
On 01/09/2022 18:15, Matt Caswell wrote: On 01/09/2022 13:21, Dave Coombs via openssl-users wrote: So!  Is it possible to work around these, using ASN1_MACRO trickery or what-have-you?  It's pretty clear I should end up with an empty bit- string and integer value 0x42, so is there a way to loo

Re: parsing invalid DER

2022-09-01 Thread Matt Caswell
On 01/09/2022 13:21, Dave Coombs via openssl-users wrote: So! Is it possible to work around these, using ASN1_MACRO trickery or what-have-you? It's pretty clear I should end up with an empty bit- string and integer value 0x42, so is there a way to loosen the parser's pickiness and achieve th

parsing invalid DER

2022-09-01 Thread Dave Coombs via openssl-users
Hello, I have in my possession some smartcards whose pkcs15 objects contain incorrectly structured DER encodings, and I need to get these cards working in my card management tool. I've made structs corresponding to the relevant parts of pkcs15 using openssl's ASN1 module, but naturally the invali