Function esp_idf_svc::hal::sys::mbedtls_x509_crt_check_extended_key_usage
source ยท pub unsafe extern "C" fn mbedtls_x509_crt_check_extended_key_usage(
crt: *const mbedtls_x509_crt,
usage_oid: *const i8,
usage_len: usize,
) -> i32
Expand description
\brief Check usage of certificate against extendedKeyUsage.
\param crt Leaf certificate used. \param usage_oid Intended usage (eg MBEDTLS_OID_SERVER_AUTH or MBEDTLS_OID_CLIENT_AUTH). \param usage_len Length of usage_oid (eg given by MBEDTLS_OID_SIZE()).
\return 0 if this use of the certificate is allowed, MBEDTLS_ERR_X509_BAD_INPUT_DATA if not.
\note Usually only makes sense on leaf certificates.