pub unsafe extern "C" fn s2n_config_set_max_cert_chain_depth(
    config: *mut s2n_config,
    max_depth: u16
) -> c_int
Expand description

Sets the maximum allowed depth of a cert chain used for X509 validation. The default value is 7. If this limit is exceeded, validation will fail if s2n_config_disable_x509_verification() has not been called. 0 is an illegal value and will return an error. 1 means only a root certificate will be used.

@param config The configuration object being updated @param max_depth The number of allowed certificates in the certificate chain @returns S2N_SUCCESS on success. S2N_FAILURE on failure