pub type mbedtls_x509_crt_ca_cb_t = Option<unsafe extern "C" fn(p_ctx: *mut c_void, child: *const mbedtls_x509_crt, candidate_cas: *mut *mut mbedtls_x509_crt) -> c_int>;
Expand description

\brief The type of trusted certificate callbacks.

                 Callbacks of this type are passed to and used by the CRT
                 verification routine mbedtls_x509_crt_verify_with_ca_cb()
                 when looking for trusted signers of a given certificate.

                 On success, the callback returns a list of trusted
                 certificates to be considered as potential signers
                 for the input certificate.

\param p_ctx An opaque context passed to the callback. \param child The certificate for which to search a potential signer. This will point to a readable certificate. \param candidate_cas The address at which to store the address of the first entry in the generated linked list of candidate signers. This will not be \c NULL.

\note The callback must only return a non-zero value on a fatal error. If, in contrast, the search for a potential signer completes without a single candidate, the callback must return \c 0 and set \c *candidate_cas to \c NULL.

\return \c 0 on success. In this case, \c *candidate_cas points to a heap-allocated linked list of instances of ::mbedtls_x509_crt, and ownership of this list is passed to the caller. \return A negative error code on failure.

Aliased Type§

enum mbedtls_x509_crt_ca_cb_t {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *const mbedtls_x509_crt, _: *mut *mut mbedtls_x509_crt) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *const mbedtls_x509_crt, _: *mut *mut mbedtls_x509_crt) -> i32)

Some value of type T.