Hi!
First off, many thanks for taking the time to do this useful lib!!
For a side project, I was trying to parse certificates inside exe files -- PE format -- to get the expiration date.
I'll skip the details on how to do it, but it turns out it's using PKCS7 format to store the certificate chain, hence the use of this lib.
When I call Parse() with the payload in DER this is what I get:
structure error: tags don't match (4 vs {class:0 tag:16 length:23 isCompound:true}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} unsignedData @2
I had to patch the library and can make a PR if that's necessary: tehmoon@8f12946
As you can see, I de-serialize using RawValue and passing the underlying bytes. I didn't dig much further so I have no idea what's wrong.
I've attached the pkcs7 data in hex string format: data.hex.txt
Even though the patch works well for me, I thought about opening an issue to contribute a little bit.
Hi!
First off, many thanks for taking the time to do this useful lib!!
For a side project, I was trying to parse certificates inside
exefiles --PEformat -- to get the expiration date.I'll skip the details on how to do it, but it turns out it's using PKCS7 format to store the certificate chain, hence the use of this lib.
When I call
Parse()with the payload inDERthis is what I get:I had to patch the library and can make a PR if that's necessary: tehmoon@8f12946
As you can see, I de-serialize using
RawValueand passing the underlying bytes. I didn't dig much further so I have no idea what's wrong.I've attached the
pkcs7data in hex string format: data.hex.txtEven though the patch works well for me, I thought about opening an issue to contribute a little bit.