-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of PKCS#7 ? Chapter 5.2.1 RFC5652 #192
Comments
https://github.com/etingof/pyasn1-modules/blob/master/tests/test_rfc4357.py There is an example in this test that uses EnvelopedData. Hope that helps. |
Hi @russhousley , Many thanks for your answer. I think i need to clarify my first comment. For instance, regarding your link, it would be your first example with ContentType = EnvelopedData rather than PlainData. Kind regards. |
In practice, you are unlikely to run into a situation where the content is something other than an OCTET STRING. With PKCS#7, most of the contents were associated with the id_data, which has a content of OCTET STRING. Also, if the decode with OCTET STRING does not work, the you need to look at the content type to determine the type to use. ANY is really a kind of placeholder. |
Hi @russhousley , Not so unlikely, if you want to work with X9-TR34 solutions. I agree with your comment, but the aim of my ticket is to stress that the module is only supporting an OCTET STRING decoding as far as I have understood. So it will be nice to have also this ELSE with the ANY. Kind regards. |
Have you tried using the rfc2315 module instead of the rfc5652 module? The rfc2315 module has the ANY in the definition of the SignedData. |
Hi,
First, many thanks for your valuable code and work.
I'm trying to create some CMS structure where the SignedData is made of EnvelopedData, and it seems that I'm facing a compatibility issue with PKCS#7.
I get the following error :
And according to trace, I understand that we are assuming an OctetString in eContent (as defined by CMS RFC5652)
But if I have correctly understood the RFC, since the contentType is 1.2.840.113549.1.7.3 envelopedData (PKCS #7), the DER sequence is valid.
And according to the chapter 5.2.1 of the RFC5652, the parser may try OctetString and then try to decode with an ANY syntax.
Many thanks in advance for your answer.
Best regards.
The text was updated successfully, but these errors were encountered: