-
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
Support for sub-parsers for SEQUENCE/SET OF #30
Comments
Commit 3a360ae does most of this, but it is not yet complete.
|
vanrein
changed the title
Support for sub-parsers
Support for sub-parsers for SEQUENCE/SET OF
Mar 6, 2017
Commit 3b12800 resolved most issues that showed up while working on the code and inspecting header files:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quick DER chooses to be simplistic in terms of memory management. Layers built around it, such as LillyDAP may well be smarter.
This means that the one thing Quick DER refuses, namely to parse
SEQUENCE OF
andSET OF
, can be supported with some help of the outer layer. The issue now is to make Quick DER support such outer layers (and test it with LillyDAP).We could map to a
dernode
union instead ofdercursor
for these structures, and initiallyder_unpack()
into the same form as now namely thedercursor
in thewire
variant of the union; surrounding code in the smarter application can then be mapped to theinfo
form with an array pointerderray
and array length countdercnt
. The array elements themselves aredernode
values once more. It is the application's knowledge when to use thewire
form and when to useinfo
. It usually maps one way afterder_unpack()
and the other way beforeder_pack()
.Finally, the ASN.1 compiler must produce useful definitions that guide the application to the indices and syntaxes of sub-elements -- which must be supportive of a recursive procedure because, for instance, there may be a
SEQUENCE OF
inside of aSEQUENCE OF
. Such recursion would of course apply to each individual element, as the structure is repeating.Once this is done, we shall consider adding generic code to Quick DER, using a callback for memory allocation.
The text was updated successfully, but these errors were encountered: