mbedtls_x509_crt_verify_restartable() function
Restartable version of \c mbedtls_crt_verify_with_profile()
Syntax
int mbedtls_x509_crt_verify_restartable(mbedtls_x509_crt *crt,
mbedtls_x509_crt *trust_ca,
mbedtls_x509_crl *ca_crl,
const mbedtls_x509_crt_profile *profile,
const char *cn,
uint32_t *flags,
int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *),
void *p_vrfy,
mbedtls_x509_crt_restart_ctx *rs_ctx);
Arguments
crt
The certificate chain to be verified.
trust_ca
The list of trusted CAs.
ca_crl
The list of CRLs for trusted CAs.
profile
The security profile to use for the verification.
cn
The expected Common Name. This may be \c NULL if the CN need not be verified.
flags
The address at which to store the result of the verification. If the verification couldn't be completed, the flag value is set to (uint32_t) -1.
f_vrfy
The verification callback to use. See the documentation of mbedtls_x509_crt_verify() for more information.
p_vrfy
The context to be passed to \p f_vrfy.
rs_ctx
The restart context to use. This may be set to \c NULL to disable restartable ECC.
Return value
See \c mbedtls_crt_verify_with_profile(), or #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of operations was reached: see \c mbedtls_ecp_set_max_ops().
Notes
Performs the same job as \c mbedtls_crt_verify_with_profile() but can return early and restart according to the limit set with \c mbedtls_ecp_set_max_ops() to reduce blocking.