mbedtls_asn1_write_bool() function
Write a boolean tag (#MBEDTLS_ASN1_BOOLEAN) and value in ASN.1 format.
Syntax
int mbedtls_asn1_write_bool(unsigned char **p,
const unsigned char *start,
int boolean);
Arguments
p
The reference to the current position pointer.
start
The start of the buffer, for bounds-checking.
boolean
The boolean value to write, either \c 0 or \c 1.
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_bool() is called by 2 functions and calls 1 function:
![]()
mbedtls_asn1_write_bool()
mbedtls_asn1_write_bool():
![]()
mbedtls_asn1_write_bool()