DefaultTrustEvaluator - SwiftDocOrg/Alamofire GitHub Wiki
DefaultTrustEvaluator
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.
public final class DefaultTrustEvaluator:β ServerTrustEvaluating
Inheritance
Initializers
init(validateHost:β)
Creates a DefaultTrustEvaluator.
public init(validateHost:β Bool = true)
Parameters
- validateHost:β Determines whether or not the evaluator should validate the host.
trueby default.
Methods
evaluate(_:βforHost:β)
public func evaluate(_ trust:β SecTrust, forHost host:β String) throws