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

None ASN1 Type issue on decoding #226

Open
SanthoshPillalamarry opened this issue Jul 1, 2024 · 0 comments
Open

None ASN1 Type issue on decoding #226

SanthoshPillalamarry opened this issue Jul 1, 2024 · 0 comments

Comments

@SanthoshPillalamarry
Copy link

SanthoshPillalamarry commented Jul 1, 2024

Below is my code snippet:

x = "308201cc04080c000000000000000408a80de7c97e000000161036633533346433323334333337653533308201a0301e040804000000000000000408240000000000000004089f86010000000000301e040804000000000000000408400d0300000000000408df93040000000000301e040805000000000000000408180000000000000004089f86010000000000301e040805000000000000000408e09304000000000004087f1a060000000000301e040806000000000000000408000000000000000004089f86010000000000301e040807000000000000000408240000000000000004089f86010000000000301e040808000000000000000408000000000000000004089f86010000000000301e040809000000000000000408000000000000000004089f86010000000000301e04080a000000000000000408000000000000000004089f86010000000000301e04080b000000000000000408000000000000000004089f86010000000000301e04080c000000000000000408000000000000000004089f86010000000000301e04080d000000000000000408000000000000000004089f86010000000000301e04080e000000000000000408000000000000000004089f860100000000003000"

from pyasn1.codec.der import decoder
decoder.decode(bytes.fromhex(x))

The decode resulted in the error: "ttributeError("'NoneType' object has no attribute 'tagSet'")"

I know the error is due to the last sequence (representing NULL without value): 3000.

This was working previously with asn1 from pycryptodome. I wanted to switch my code to pyasn1. Any help ?

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

No branches or pull requests

1 participant