Type Alias esp_idf_sys::mbedtls_x509_crt_ext_cb_t
source · pub type mbedtls_x509_crt_ext_cb_t = Option<unsafe extern "C" fn(p_ctx: *mut c_void, crt: *const mbedtls_x509_crt, oid: *const mbedtls_x509_buf, critical: c_int, p: *const c_uchar, end: *const c_uchar) -> c_int>;
Expand description
\brief The type of certificate extension callbacks.
Callbacks of this type are passed to and used by the
mbedtls_x509_crt_parse_der_with_ext_cb() routine when
it encounters either an unsupported extension or a
"certificate policies" extension containing any
unsupported certificate policies.
Future versions of the library may invoke the callback
in other cases, if and when the need arises.
\param p_ctx An opaque context passed to the callback. \param crt The certificate being parsed. \param oid The OID of the extension. \param critical Whether the extension is critical. \param p Pointer to the start of the extension value (the content of the OCTET STRING). \param end End of extension value.
\note The callback must fail and return a negative error code if it can not parse or does not support the extension. When the callback fails to parse a critical extension mbedtls_x509_crt_parse_der_with_ext_cb() also fails. When the callback fails to parse a non critical extension mbedtls_x509_crt_parse_der_with_ext_cb() simply skips the extension and continues parsing.
\return \c 0 on success. \return A negative error code on failure.
Aliased Type§
enum mbedtls_x509_crt_ext_cb_t {
None,
Some(unsafe extern "C" fn(_: *mut c_void, _: *const mbedtls_x509_crt, _: *const mbedtls_asn1_buf, _: i32, _: *const u8, _: *const u8) -> i32),
}
Variants§
None
No value.
Some(unsafe extern "C" fn(_: *mut c_void, _: *const mbedtls_x509_crt, _: *const mbedtls_asn1_buf, _: i32, _: *const u8, _: *const u8) -> i32)
Some value of type T
.