Add support for rfc2633 sMIME capabilities signed attr #215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I'm using asn1crypto on a project that requires support for S/MIME Version 3 (rfc2633), especially the sMIME capabilities signed attribute.
Right now, asn1crypto master only parses the sMIME capabilities signed attr into universal types (a set of sequences) with raw OIDs.
This also exposes some (probably buggy) behaviour from asn1crypto, where unknown signed attrs such as sMIME capabilities are empty and hoisted at the beginning of the signed attrs field when dumping.
For an example, see this PKCS#7 signature before and after being parsed by asn1crypto (look for the sMIMECapabilities field and see how it was 1) moved, 2) emptied).
This pull request adds support for rfc2633 sMIME capabilities signed attr, to allow parsing it as a set of sequences of algorithm identifiers (as per the spec). This prevents the faulty parsing and dumping behaviour, only for this signed attr.
I need to add a couple of unit tests, could you provide guidance about this? I think new fixtures need to be generated for the CMS tests, but I'm not sure what's the most appropriate way.
Thank you for this incredibly useful library.