mbedtls_asn1_write_len() function
Write a length field in ASN.1 format.
Syntax
int mbedtls_asn1_write_len(unsigned char **p,
const unsigned char *start,
size_t len);
Arguments
p
The reference to the current position pointer.
start
The start of the buffer, for bounds-checking.
len
The length value to write.
Return value
The number of bytes written to \p p on success. A negative \c MBEDTLS_ERR_ASN1_XXX error code on failure.
Notes
This function works backwards in data buffer.
![]()
int mbedtls_asn1_write_len(unsigned char **p, const unsigned char *start, size_t len)![]()
int mbedtls_asn1_write_len(unsigned char **p, const unsigned char *start,![]()
if ((ret = mbedtls_asn1_write_len(&asn1_len_p, asn1_tag_len_buf, name->val.len)) < 0) {![]()
mbedtls_asn1_write_len(&p, buf, single_san_len));![]()
mbedtls_asn1_write_len(&c, buf, sub_len));
mbedtls_asn1_write_len() is called by 21 functions:
![]()
mbedtls_asn1_write_len()
mbedtls_asn1_write_len():
![]()
mbedtls_asn1_write_len()