DefaultTrustEvaluator
public final class DefaultTrustEvaluator : ServerTrustEvaluating
An evaluator which uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge. Applications are encouraged to always validate the host in production environments to guarantee the validity of the server’s certificate chain.
-
Creates a
DefaultTrustEvaluator
.Declaration
Swift
public init(validateHost: Bool = true)
Parameters
validateHost
Determines whether or not the evaluator should validate the host.
true
by default. -
Declaration
Swift
public func evaluate(_ trust: SecTrust, forHost host: String) throws