mirror of
https://github.com/apple/swift-certificates
synced 2026-11-24 04:27:49 +00:00
### Motivation: The certificate chain returned by validation has properties that are currently not expressed in the API. Introducing a type that does so allows other APIs to build on these properties. ### Modifications: * Add a new `ValidatedCertificateChain` type and use it as a result type for certificate validation. Since a validated chain always has at least a leaf and a root, the type gives direct access to them. * Deprecate the previous validate function and introduce a replacement. Update use of the now-deprecated API and duplicate tests to include both APIs. ### Result: Certificate validation returns a type that conceptually holds meaning.