RevocationTrustEvaluator
public final class RevocationTrustEvaluator : ServerTrustEvaluating
An evaluator which Uses the default and revoked server trust evaluations allowing you to control whether to validate the host provided by the challenge as well as specify the revocation flags for testing for revoked certificates. Apple platforms did not start testing for revoked certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is demonstrated in our TLS tests. Applications are encouraged to always validate the host in production environments to guarantee the validity of the server’s certificate chain.
-
Represents the options to be use when evaluating the status of a certificate. Only Revocation Policy Constants are valid, and can be found in Apple’s documentation.
See moreDeclaration
Swift
public struct Options : OptionSet, Sendable -
Creates a
RevocationTrustEvaluatorusing the provided parameters.Note
Default and host validation will fail when using this evaluator with self-signed certificates. Use
PinnedCertificatesTrustEvaluatorif you need to use self-signed certificates.Declaration
Swift
public init(performDefaultValidation: Bool = true, validateHost: Bool = true, options: Options = .any)Parameters
performDefaultValidationDetermines whether default validation should be performed in addition to evaluating the pinned certificates.
trueby default.validateHostDetermines whether or not the evaluator should validate the host, in addition to performing the default evaluation, even if
performDefaultValidationisfalse.trueby default.optionsThe
Optionsto use to check the revocation status of the certificate..anyby default. -
Declaration
Swift
public func evaluate(_ trust: SecTrust, forHost host: String) throws
View on GitHub
Install in Dash