Hello Lars,
That is an interesting use case. The library actually has a new ASN parser that can be enabled using
./configure --enable-asn=template
There are other options that can be enabled with the defines documented
in https://github.com/wolfSSL/wolfssl/blob … /src/asn.c
* WOLFSSL_ASN_TEMPLATE: Encoding and decoding using a template.
* WOLFSSL_DEBUG_ASN_TEMPLATE: Enables debugging output when using ASN.1
templates.
* WOLFSSL_ASN_TEMPLATE_TYPE_CHECK: Use ASN functions to better test compiler
type issues for testing
* CRLDP_VALIDATE_DATA: For ASN template only, validates the reason data
Mostly the ASN1 handling in the library is in the context of certificate handling, but maybe you'll find this extension callback example useful:
https://github.com/wolfSSL/wolfssl-exam … callback.c
Let us know if there are questions.
Thanks,
Eric @ wolfSSL Support