mbedtls_asn1_write_bitstring() function
Write a bitstring tag (#MBEDTLS_ASN1_BIT_STRING) and value in ASN.1 format.
Syntax
int mbedtls_asn1_write_bitstring( unsigned char **p,
unsigned char *start,
const unsigned char *buf,
size_t bits );
Arguments
p
The reference to the current position pointer.
start
The start of the buffer, for bounds-checking.
buf
The bitstring to write.
bits
The total number of bits in the bitstring.
Return value
The number of bytes written to \p p on success. A negative error code on failure.
Notes
This function works backwards in data buffer.