mbedtls_asn1_write_enum() function
Write an enum tag (#MBEDTLS_ASN1_ENUMERATED) and value in ASN.1 format.
Syntax
int mbedtls_asn1_write_enum(unsigned char **p,
const unsigned char *start,
int val);
Arguments
p
The reference to the current position pointer.
start
The start of the buffer, for bounds-checking.
val
The integer 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.
mbedtls_asn1_write_enum() calls 1 function:
![]()
mbedtls_asn1_write_enum()
mbedtls_asn1_write_enum():
![]()
mbedtls_asn1_write_enum()