SecTrustEvaluateAsyncWithError(_:_:_:)
Evaluates a trust object asynchronously on the specified dispatch queue.
Declaration
func SecTrustEvaluateAsyncWithError(_ trust: SecTrust, _ queue: dispatch_queue_t, _ result: @escaping SecTrustWithErrorCallback) -> OSStatusParameters
- trust:
The trust management object to evaluate. A trust management object includes the certificate to be verified plus the policy or policies to be used in evaluating trust. It can optionally also include other certificates to be used in verifying the first certificate. Use the Sectrustcreatewithcertificates(_:_:_:) function to create a trust management object.
- queue:
The dispatch queue on which the result block should execute. You must call the method from the same queue.
- result:
A closure that the method calls to report the result of trust evaluation. The method calls the closure exactly once if the method returns Errsecsuccess, and not at all otherwise. The method might call the closure synchronously in some cases, before returning.
Mentioned in
Return Value
A result code. See Security Framework Result Codes.
Discussion
This method behaves like SecTrustEvaluateWithError(_:_:), except that it provides an evaluation by calling the given closure. The method might do this synchronously before returning if the trust instance already contains a result. Otherwise, the method returns immediately, performs the evaluation asynchronously, and calls the closure with the result later.