mbedtls_x509write_crt_set_extension() function
Generic function to add to or replace an extension in the CRT
Arguments
critical
if the extension is critical (per the RFC's definition)
val
value of the extension OCTET STRING
val_len
length of the value data
Return value
0 if successful, or a MBEDTLS_ERR_X509_ALLOC_FAILED