AnyPolicy

AnyPolicy can be used to erase the concrete type of some VerifierPolicy. Only use AnyPolicy if type erasure is necessary. Instead try to use conditional inclusion of different policies using PolicyBuilder.

AnyPolicy.swift:29
iOS
13+
macOS
10.15+
tvOS
13+
watchOS
6+
struct AnyPolicy

Use AnyPolicy at the top level during construction of a Verifier to get a Verifier of type Verifier<AnyPolicy> e.g.:

let verifier = Verifier(rootCertificates: CertificateStore()) {
    AnyPolicy {
        RFC5280Policy(validationTime: Date())
    }
}