mbedtls_asn1_write_octet_string() function
Write an octet string tag (#MBEDTLS_ASN1_OCTET_STRING) and value in ASN.1 format.
Syntax
int mbedtls_asn1_write_octet_string( unsigned char **p,
unsigned char *start,
const unsigned char *buf,
size_t size );
Arguments
p
The reference to the current position pointer.
start
The start of the buffer, for bounds-checking.
buf
The buffer holding the data to write.
size
The length of the data buffer \p buf.
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.