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
I noticed parsing/validation was failing for a small number of AWS Identity Documents. I dug in a bit, and it looks like there's an issue in the parser. It seems like if the signature (or other data later in the doc) has the marker, it will skip ahead and not read the document correctly.
Unfortunately I can't share the raw data, but here's some debug info I captured.
--> (compute length) marker found at offset: 766
--> length : 764
--> length : 9
--> (compute length) marker found at offset: 764
--> length : 749
--> (compute length) marker found at offset: 762
--> length : 745
--> length : 1
--> length : 11
--> length : 9
--> length : 5
--> length : 0
--> (compute length) marker found at offset: 735
--> length : 700
--> length : 9
--> (compute length) marker found at offset: 477
--> length : 429
--> (compute length) marker found at offset: 475
--> length : 425
--> (compute length) indicator byte: 82
--> (compute length) length bytes: 01 A3
--> length : 419
--> length : 0
--> (compute length) indicator byte: 82
--> (compute length) length bytes: 01 17
--> length : 279
p7bad Failed at pkcs7.Parse(sigDecode.Bytes): ber2der: BER tag length is more than available data
You can see in this latter one it's skipping the marker in the middle of the document, in favor of the one at 735. This is bang in the middle of the signature, where you can find 0000 - so I think this is triggering as a marker here and breaking the parsing.
The text was updated successfully, but these errors were encountered:
Awesome, thanks. We ended up shifting off to a different method that doesn't need PKCS7, but I figured I'd report it anyway. Sorry I couldn't share the docs, but I've kept them handy so can test anything out. If I can get something to share I'll report back too.
I noticed parsing/validation was failing for a small number of AWS Identity Documents. I dug in a bit, and it looks like there's an issue in the parser. It seems like if the signature (or other data later in the doc) has the marker, it will skip ahead and not read the document correctly.
Unfortunately I can't share the raw data, but here's some debug info I captured.
Here's a good document, from asn1parse:
This parses fine
and here's a copy of a doc that was failing:
and the debug output:
You can see in this latter one it's skipping the marker in the middle of the document, in favor of the one at 735. This is bang in the middle of the signature, where you can find
0000
- so I think this is triggering as a marker here and breaking the parsing.The text was updated successfully, but these errors were encountered: