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

Crashes encoding OIDs starting with 2.999 #279

Open
James-E-A opened this issue Dec 1, 2023 · 1 comment
Open

Crashes encoding OIDs starting with 2.999 #279

James-E-A opened this issue Dec 1, 2023 · 1 comment

Comments

@James-E-A
Copy link

https://lapo.it/asn1js/#060488378952

https://www.oid-info.com/get/2.999

import asn1
assert asn1.__version__ == '2.7.0'

e = asn1.Encoder()
e.start()

e.write('2.999.1234', asn1.Numbers.ObjectIdentifier)  # fails on this line
# asn1.Error: Illegal object identifier

result = e.output()

if result != bytes.fromhex('060488378952'):
    raise AssertionError("fail")  # we never even get this far...
@andrivet
Copy link
Owner

andrivet commented Dec 2, 2023

It does not "crash" but raises an error because the library considered the OID as invalid. At this stage, it is not clear for me if OID starting with 2.999 are indeed valid. I would say no, but I will have to look at this further.

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

2 participants