nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ cc3xx_asn1_get_tag()

psa_status_t cc3xx_asn1_get_tag ( unsigned char ** p,
const unsigned char * end,
size_t * len,
int tag )

Get the tag and length of the element. Check for the requested tag. Updates the pointer to immediately behind the tag and length.

Parameters
pOn entry, *p points to the start of the ASN.1 element. On successful completion, *p points to the first byte after the length, i.e. the first byte of the content. On error, the value of *p is undefined.
endEnd of data.
lenOn successful completion, *len contains the length read from the ASN.1 input.
tagThe expected tag.
Returns
PSA_SUCCESS if successful.
PSA_ERROR_BUFFER_TOO_SMALL if the buffer is too small.
PSA_ERROR_GENERIC_ERROR if any other error occured.