mbedtls_asn1_get_bitstring_null() function
Retrieve a bitstring ASN.1 tag without unused bits and its value. Updates the pointer to the beginning of the bit/octet string.
Syntax
int mbedtls_asn1_get_bitstring_null(unsigned char **p,
const unsigned char *end,
size_t *len);
Arguments
p
On entry, \c *p points to the start of the ASN.1 element. On successful completion, \c *p points to the first byte of the content of the BIT STRING. On error, the value of \c *p is undefined.
len
On success, \c *len is the length of the content in bytes.
Return value
0 if successful. #MBEDTLS_ERR_ASN1_INVALID_DATA if the input starts with a valid BIT STRING with a nonzero number of unused bits. An ASN.1 error code if the input does not start with a valid ASN.1 BIT STRING.
mbedtls_asn1_get_bitstring_null() is called by 3 functions and calls 1 function:
![]()
mbedtls_asn1_get_bitstring_null()
mbedtls_asn1_get_bitstring_null():
![]()
mbedtls_asn1_get_bitstring_null()