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

chore: simpler ber2der + too-big-length detection #91

Closed
wants to merge 1 commit into from

Conversation

ibukanov
Copy link

In ber2der skip building of intermediate tree of BER objects. Rather write immediately the DER bytes patching as necessary the length when it becomes known. Make code more idiomatic using append() on byte slices.

If BER data use fixed length encoding, report an error when the total length of children is less than the length declared in the parent. Previously such error was ignored with the parent length fixed in the DER encoding.

In ber2der skip building of intermediate tree of BER objects. Rather write
immediately the DER bytes patching as necessary the length when it becomes
known. Make code more idiomatic using append() on byte slices.

If BER data use fixed length encoding, report an error when the total length of
children is less than the length declared in the parent. Previously such error
was ignored with the parent length fixed in the DER encoding.
@jessepeterson
Copy link

Hello @ibukanov. You may want to check out #73 and #88 and perhaps submit this to https://github.com/smallstep/pkcs7

@ibukanov ibukanov closed this by deleting the head repository Feb 1, 2025
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

Successfully merging this pull request may close these issues.

2 participants