Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/X509/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ add_library(X509
"X509BaseTypes/Time.swift"
"X509BaseTypes/TimeCalculations.swift"
"X509BaseTypes/Validity.swift"
"X509SendableMetatype.swift"
)

target_link_libraries(X509 PUBLIC
Expand Down
3 changes: 2 additions & 1 deletion Sources/X509/Verifier/VerifierPolicy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ import SwiftASN1
/// the basic checks from that RFC. Other objects are less common, such as ``OCSPVerifierPolicy``, which performs live
/// revocation checking. Users can also implement their own policies to enable swift-certificates to support other
/// use-cases.
@preconcurrency
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
public protocol VerifierPolicy {
public protocol VerifierPolicy: _X509SendableMetatype {
/// The X.509 extension types that this policy understands and enforces.
///
/// X.509 certificates can have extensions marked as `critical`. These extensions _must_ be understood and enforced by the
Expand Down
19 changes: 19 additions & 0 deletions Sources/X509/X509SendableMetatype.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftCertificates open source project
//
// Copyright (c) 2025 Apple Inc. and the SwiftCertificates project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftCertificates project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

#if compiler(>=6.2)
public typealias _X509SendableMetatype = SendableMetatype
#else
public typealias _X509SendableMetatype = Any
#endif
Loading