Skip to content

Commit 1ef30e3

Browse files
authored
PackageCollectionsSigning: avoid peeking into X509_STORE_CTX (#3730)
This uses the `CCryptoBoringSSL_X509_STORE_CTX_get_current_cert` accessor to access the `current_cert` member. This is purely a cleanup change that will become important when swift-crypto is bumped as BoringSSL has made more of the interfaces opaque.
1 parent 315119f commit 1ef30e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PackageCollectionsSigning/Certificate/CertificatePolicy.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ extension CertificatePolicy {
182182
// Certs could have unknown critical extensions and cause them to be rejected.
183183
// Check if they are tolerable.
184184
if errorCode == X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION {
185-
guard let cert = ctx?.pointee.current_cert else {
185+
guard let ctx = ctx, let cert = CCryptoBoringSSL_X509_STORE_CTX_get_current_cert(ctx) else {
186186
return result
187187
}
188188

0 commit comments

Comments
 (0)