Skip to content
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

feat: added support for non-canonically DER encoded (counter)signatures #99

Merged

Conversation

metthal
Copy link
Contributor

@metthal metthal commented Apr 21, 2024

This adds deferred parsing of SignedAttributes field of SignedInfo structure within CMS, allowing us to directly access the raw data of this field so that it can be properly verified without canonical DER decoder in the way.

To make things easier and avoid rewrite of as many code as possible, there's option to turn DeferSignerInfo structure directly into SignerInfo structure. On top of that, all other fields are decoded as usual, making deferred structure still useful in cases where non-deferred attributes are needed.

Affected binary added to tests.

This adds deferred parsing of SignedAttributes field of SignedInfo
structure within CMS, allowing us to directly access the raw data of
this field so that it can be properly verified without canonical DER
decoder in the way.

To make things easier and avoid rewrite of as many code as possible,
there's option to turn `DeferSignerInfo` structure directly into
`SignerInfo` structure. On top of that, all other fields are decoded
as usual, making deferred structure still useful in cases where
non-deferred attributes are needed.

Affected binary added to tests.
@metthal metthal force-pushed the modules/pe/deferred-der-decoding branch from 2c7bcec to 2e5e6bf Compare April 21, 2024 20:09
@metthal metthal changed the title Added support for non-canonically DER encoded (counter)signatures feat: Added support for non-canonically DER encoded (counter)signatures Apr 21, 2024
@plusvic plusvic changed the title feat: Added support for non-canonically DER encoded (counter)signatures feat: added support for non-canonically DER encoded (counter)signatures Apr 22, 2024
@plusvic plusvic merged commit dd7e7e7 into VirusTotal:authenticode2 Apr 22, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants