ASN1_TYPE_TAG_BITS value error
Closed this issue · 1 comments
saygins commented
ASN1_TYPE_TAG_BITS defined in "asn1.h" as 24. it should be 5.
lmb commented
The documentation you linked is correct, except that it doesn't mention multipart tags. If the 5 bit tag value is equal to 0b11111 the following bytes encode the actual tag value. This value may be larger than 2^5, in fact it can be arbitrarily large.
This means I had to make a choice how large tag values the library should support. Since class and encoding take 3 bits, we have 29 bits left if we want to store the type as a uint32. The code for decoding the tag only works with multiples of 8 bits from what I remember, so I chose 24.
Is this a problem for you?