mbedtls_asn1_get_tag() function
Get the tag and length of the tag. Check for the requested tag. Updates the pointer to immediately behind the tag and length.
Syntax
int mbedtls_asn1_get_tag( unsigned char **p,
const unsigned char *end,
size_t *len,
int tag );
Arguments
p
The position in the ASN.1 data
len
The variable that will receive the length
Return value
0 if successful, MBEDTLS_ERR_ASN1_UNEXPECTED_TAG if tag did not match requested tag, or another specific ASN.1 error code.