-
Notifications
You must be signed in to change notification settings - Fork 6
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
Indefinite length values #2
Comments
Is this already implemented in the Golang |
No, it isn't. There is abandoned implementation https://go-review.googlesource.com/c/go/+/13746 which i have found. But it seems not working well: it doesn't parse BER data i need. Spec is T-REC-X.690-201508-I!!PDF-E.pdf, it starts from 8.1.3.1. |
Thanks, I'm getting the code cleaned up and brought up to date for 1.14 first, then I'll start looking at this. You mentioned the abandoned implementation wasn't parsing the BER data you need it to. Do you have any examples of the bytes and expected output you can share? (there may be some in the PDF, I've not looked yet) |
I wrote my own implementation of indefinite length values (based on abandoned implementation which i mentioned above) but i'm not sure if it will work in all cases. About examples: i can't share them due to legal restrictions, but the main problem was in alignment zeros in files (which is not in BER specification). Second problem was fixed by removing all DER restrictions from If you will implement BER with indefinite lengths i can help with testing it on my files. |
Can you have a look at #4 when you get a chance |
I decided to write my own BER parser because using golang DER based parser it is hard to parse |
Can you implement indefinite length values, please?
The text was updated successfully, but these errors were encountered: