Initializerswift-certificates 1.8.0X509
init(policy:)
AllOfPolicies.swift:41- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init(@PolicyBuilder policy: () throws -> Policy) throws
init(@PolicyBuilder policy: () throws -> Policy) throws
import X509
A library for working with X.509 certificates.
struct AllOfPolicies<Policy> where Policy : VerifierPolicy
Use this to build a policy where all of the sub-policies must be met for the overall policy to be met. This is only useful within a OneOfPolicies block, because at the top-level, it is already required for all policies to be met, so adding this at the top-level is redundant. For example, the following policy requires that RFC5280Policy is always met, and then either policy C is met, or A and B are both met. If A and B are both met, then C does not have to be met. If C is met, then neither A nor B need to be met.
@resultBuilder struct PolicyBuilder
Provides a result-builder style DSL for constructing a VerifierPolicy
.
init(@PolicyBuilder policy: () -> Policy)
var verifyingCriticalExtensions: [ASN1ObjectIdentifier] { get }
mutating func chainMeetsPolicyRequirements(chain: UnverifiedCertificateChain) async -> PolicyEvaluationResult