Function esp_idf_sys::mbedtls_asn1_get_tag
source ยท pub unsafe extern "C" fn mbedtls_asn1_get_tag(
p: *mut *mut c_uchar,
end: *const c_uchar,
len: *mut usize,
tag: c_int,
) -> c_int
Expand description
\brief Get the tag and length of the element. Check for the requested tag. Updates the pointer to immediately behind the tag and length.
\param p On entry, \c *p points to the start of the ASN.1 element. On successful completion, \c *p points to the first byte after the length, i.e. the first byte of the content. On error, the value of \c *p is undefined. \param end End of data. \param len On successful completion, \c *len contains the length read from the ASN.1 input. \param tag The expected tag.
\return 0 if successful. \return #MBEDTLS_ERR_ASN1_UNEXPECTED_TAG if the data does not start with the requested tag. \return #MBEDTLS_ERR_ASN1_OUT_OF_DATA if the ASN.1 element would end beyond \p end. \return #MBEDTLS_ERR_ASN1_INVALID_LENGTH if the length is unparsable.