-
Notifications
You must be signed in to change notification settings - Fork 5
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
IMPLICIT tags via DER_PACK_ANY fail on "" #17
Comments
Not completely sure how nested tags in constructions like Not sure it ever happens (that is, if it is permitted by ASN.1) but our Ignoring this for now, who knows if we'll discover a bug due to it... unlikely to ever be used though. |
Not completely sure how nested tags in constructions like [0] [1] INTEGER work under IMPLICIT TAGS?!? Not sure it ever happens (that is, if it is permitted by ASN.1) but our DER_PIMP_ definitions may lead to strange things when they start with [1] and are called with the [0] as their implicit_tag parameter. Ignoring this for now, who knows if we'll discover a bug due to it... unlikely to ever be used though.
Solved in 5056727, albeit with the remark above this one. For what it's worth:
So it looks like the requested change has been made. |
An extension to the latter / closing remarks... In addition, note how the call to
This, however, is wrong. It lacks the This seems like good grounds to re-open the issue. |
…open, #17 We now do generate the DER_PIMP_ with surrounding tags replaced. This means that any use for COMPONENTS OF will need one more def, DER_COMP_
We still generate
so storing the
Nice. Note that the reference from Something else worth noting is this distinction:
Here the |
With the new support for
IMPLICIT
tags such as used by LDAP, many things now work better. But there are exceptions not yet solved. Take thisLDAPMessage
for instance,Note how nothing is contained in the
[0]
tag on the last line. This is possible when the contained information is elementary, empty and implicitly tagged. This is indeed the case, if we look at the definitions:This however, translates to:
The problem lies in the
DER_PACK_STORE | DER_PACK_ANY
nested within theDER_PACK_ENTER | DER_TAG_CONTEXT(0)
ofDER_PACK_rfc4511_AuthenticationChoice
. This does not seem to capture an empty string (and probably nothing that is not proper DER-encoded data, so header / length / value format.What needs to be done, is replace these three lines
with the single line
This way, the structure is stored without any attempt to entering it -- which is the intention.
The text was updated successfully, but these errors were encountered: