From dcd75df8529a2c92fb2401c04cc31e63e1506ad6 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Tue, 29 Oct 2024 10:45:09 +1000 Subject: [PATCH] ASN template documentation: adding basics for decoding First draft of ASN template documentation that helps with writing parsing code. --- wolfcrypt/src/ASN_TEMPLATE.md | 162 ++++++++++++++++++++++++++++++++++ wolfcrypt/src/include.am | 3 +- 2 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 wolfcrypt/src/ASN_TEMPLATE.md diff --git a/wolfcrypt/src/ASN_TEMPLATE.md b/wolfcrypt/src/ASN_TEMPLATE.md new file mode 100644 index 0000000000..cce2176df5 --- /dev/null +++ b/wolfcrypt/src/ASN_TEMPLATE.md @@ -0,0 +1,162 @@ +# Writing an ASN Template + +## Template + +A template that describes the ASN.1 items that are expected is required. + +Each ASN.1 item should have a named index to make it easier to choose the item +when assigning variables or getting data. + +The number of items in the template is needed too. Use a define using sizeof to +allow for modification. + +```c +/* ASN template for . + * + */ +static const ASNItem