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

protocol: BER2DER does not handle empty indefinite length objects #103

Open
oncilla opened this issue Feb 21, 2022 · 0 comments
Open

protocol: BER2DER does not handle empty indefinite length objects #103

oncilla opened this issue Feb 21, 2022 · 0 comments

Comments

@oncilla
Copy link

oncilla commented Feb 21, 2022

For indefinite length objects, we check for the terminator here:

if indefinite {

However, this does not consider that a SEQUENCE or SET can be potentially empty with indefinite length.
Instead, I think the proper thing is to first check for the termination sequence and only then read the object.
I.e., move the if condition above this line:

var subObj asn1Object

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