Function SecTrustCopyExceptions

Source
pub unsafe extern "C-unwind" fn SecTrustCopyExceptions(
    trust: &SecTrust,
) -> Option<CFRetained<CFData>>
Available on crate feature SecTrust only.
Expand description

Returns an opaque cookie which will allow future evaluations of the current certificate to succeed.

Parameter trust: A reference to an evaluated trust object.

Returns: An opaque cookie which when passed to SecTrustSetExceptions() will cause a call to SecTrustEvaluate() return kSecTrustResultProceed. This will happen upon subsequent evaluation of the current certificate unless some new error starts happening that wasn’t being reported when the cookie was returned from this function (for example, if the certificate expires then evaluation will start failing again until a new cookie is obtained.)

Normally this API should only be called once the errors have been presented to the user and the user decided to trust the current certificate chain regardless of the errors being presented, for the current application/server/protocol combination.