Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

[asn1dir] AlgorithmIdentifier.from_ber() -- AttributeError: 'SEQ' object has no attribute '_tagc' #250

Description

@James-E-A

Am I doing something wrong, or does pycrate_asn1dir.X509_2016.AuthenticationFramework.AlgorithmIdentifier not currently work as a stand-alone parser?

from pycrate_asn1dir import X509_2016
# init_modules: different OID objects ... with same OID value ...

AlgId = X509_2016.AuthenticationFramework.AlgorithmIdentifier

AlgId.from_ber(bytes.fromhex('300d06092a864886f70d01010b0500'))
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
#   File "...\.venv\Lib\site-packages\pycrate_asn1rt\asnobj.py", line 1618, in from_ber
#     self._from_ber(char, TLV)
#   File "...\.venv\Lib\site-packages\pycrate_asn1rt\asnobj.py", line 1587, in _from_ber
#     for t in self._tagc:
#              ^^^^^^^^^^
# AttributeError: 'SEQ' object has no attribute '_tagc'. Did you mean: '_tag'?

I'm getting this error on CPython 3.11.6, pycrate 0.7.0

The test input should be valid; I lifted it from offset 583 of this file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions