Skip to content

Conversation

d1vory
Copy link

@d1vory d1vory commented Oct 12, 2023

Added support of signed files, that come in format of .p7s. Magic bytes for recognizing were taken from go library

bytearray([0x30, 0x83]), bytearray([0x30, 0x84])
]
signed_data_match = bytearray([0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07])
for i, match in enumerate(start_header):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is parsed ASN1 file which may be a different length. Check possibly samples here: https://lapo.it/asn1js/
full OID may be checked too for x30:x82:
contentType ContentType OBJECT IDENTIFIER 1.2.840.113549.1.7.2 signedData (PKCS #7)

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