-
-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Description
Hello,
I have troubles parsing a "timestamp".. I don't have access to the code that produced it.
Code to reproduce the issue:
from asn1crypto.cms import EncapsulatedContentInfo
ENC_CONTENT_INFO_FILE = 'enc_content_info2.dat'
cnt = EncapsulatedContentInfo.load(open(ENC_CONTENT_INFO_FILE, 'rb').read())
cnt.nativeError with last git version b763a75 (it's the same with v1.5.1):
Traceback (most recent call last):
File "/home/paolo/src/asn1crypto/crashtest.py", line 6, in <module>
cnt.native
File "/home/paolo/src/asn1crypto/asn1crypto/core.py", line 4070, in native
self._parse_children(recurse=True)
File "/home/paolo/src/asn1crypto/asn1crypto/core.py", line 4014, in _parse_children
raise e
File "/home/paolo/src/asn1crypto/asn1crypto/core.py", line 3986, in _parse_children
child = _build(*child)
File "/home/paolo/src/asn1crypto/asn1crypto/core.py", line 5539, in _build
value = _build(*info, spec=spec, spec_params={'no_explicit': True})
File "/home/paolo/src/asn1crypto/asn1crypto/core.py", line 5581, in _build
raise ValueError(unwrap(
ValueError: Error parsing asn1crypto.core.ParsableOctetString - method should have been primitive, but constructed was found
while parsing asn1crypto.cms.EncapsulatedContentInfo
Side note, openssl asn1parse works:
openssl asn1parse -inform DER -in enc_content_info2.dat
Metadata
Metadata
Assignees
Labels
No labels