Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

DefaultTrustEvaluator

mattt edited this page Sep 18, 2020 · 2 revisions

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

ServerTrustEvaluating

Initializers

init(validateHost:​)

Creates a DefaultTrustEvaluator.

public init(validateHost:​ Bool = true)

Parameters

  • validateHost:​ Determines whether or not the evaluator should validate the host. true by default.

Methods

evaluate(_:​forHost:​)

public func evaluate(_ trust:​ SecTrust, forHost host:​ String) throws
Types
Protocols
Global Typealiases
Clone this wiki locally