[openssl-users] Application tags with ASN.1 template engine

Oleg Stepanenko olegst90 at ukr.net
Thu Nov 30 10:52:39 UTC 2017

Hello, everybody!

I'm trying to use OpenSSL ASN.1 template API (from asn1t.h) to parse ASN.1 objects in my application. The thing is that I have to use application tags instead of default ones:


and the macros (like ASN1_SEQUENCE) don't seem to provide app tags params, or at least I can't get how to do it.

The macro IMPLEMENT_ASN1_FUNCTIONS seems to make use of ASN1_item_d2i which in turn calls ASN1_item_ex_d2i passing -1 as tag. 

So how do I define Foo parsing functions so that they could regognize the struct by the app tag 13? Should I simply manually tweak generated templates?  What member do I change, then? Can I just reassign the tag member of the template? How do I specify that this is application tag, not universal?

Thank you in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20171130/1bbf0244/attachment.html>

More information about the openssl-users mailing list