mirror of
https://github.com/apple/swift-crypto
synced 2026-11-22 04:30:39 +00:00
Add missing availability guards required when development mode enabled (#337)
### Motivation When developing code that uses the BoringSSL backend on macOS, developers set a `development` boolean flag in the Package.swift. We recently switched from declaring minimum platform versions to annotating symbols with availability annotations. However, when `development = true`, it flushes out some annotations that were missing in the first pass. The result is that `main` currently doesn't build on macOS with this flag set. ### Modifications - Add missing availability guards required when development mode enabled. ### Result: Code builds macOS with `development = true` in Package.swift.
This commit is contained in:
1 parent
a8a02ac79a
commit
67e54ae1db
10 files changed
+16
No files matched your search
@@ -127,6 +127,7 @@ extension ASN1 {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension ASN1.ASN1ParserNode: Hashable { }
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
@@ -335,6 +336,7 @@ extension ASN1 {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension ASN1.ASN1ParseResult: Hashable { }
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
|
||||
@@ -58,6 +58,7 @@ extension ASN1 {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension ASN1.ASN1BitString: Hashable { }
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
|
||||
@@ -138,6 +138,7 @@ extension ASN1.ASN1Identifier {
|
||||
internal static let generalizedTime = try! ASN1.ASN1Identifier(rawIdentifier: 0x18)
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension ASN1.ASN1Identifier: Hashable { }
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
|
||||
@@ -170,6 +170,7 @@ extension IntegerBytesCollection: RandomAccessCollection {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension IntegerBytesCollection.Index: Equatable { }
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
|
||||
@@ -51,6 +51,7 @@ extension ASN1 {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension ASN1.ASN1OctetString: Hashable { }
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
|
||||
@@ -133,6 +133,7 @@ extension ASN1 {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension ASN1.ASN1ObjectIdentifier: Hashable {}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
|
||||
@@ -34,6 +34,7 @@ public enum CryptoKitError: Error {
|
||||
case invalidParameter
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension CryptoKitError: Equatable, Hashable {}
|
||||
|
||||
/// Errors from decoding ASN.1 content.
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#else
|
||||
import Foundation
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension Curve25519.KeyAgreement.PrivateKey: HPKEDiffieHellmanPrivateKeyGeneration {}
|
||||
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ extension P256.Signing {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension P256.Signing: NISTSigning {}
|
||||
|
||||
// MARK: - P256 + PrivateKey
|
||||
@@ -300,6 +301,7 @@ extension P384.Signing {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension P384.Signing: NISTSigning {}
|
||||
|
||||
// MARK: - P384 + PrivateKey
|
||||
@@ -469,6 +471,7 @@ extension P521.Signing {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension P521.Signing: NISTSigning {}
|
||||
|
||||
// MARK: - P521 + PrivateKey
|
||||
|
||||
@@ -144,9 +144,11 @@ extension SecureBytes: BidirectionalCollection {
|
||||
}
|
||||
|
||||
// MARK: - RandomAccessCollection conformance
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension SecureBytes: RandomAccessCollection { }
|
||||
|
||||
// MARK: - MutableCollection conformance
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension SecureBytes: MutableCollection { }
|
||||
|
||||
// MARK: - RangeReplaceableCollection conformance
|
||||
@@ -224,9 +226,11 @@ extension SecureBytes: DataProtocol {
|
||||
}
|
||||
|
||||
// MARK: - MutableDataProtocol conformance
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension SecureBytes: MutableDataProtocol { }
|
||||
|
||||
// MARK: - Index conformances
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
extension SecureBytes.Index: Hashable { }
|
||||
|
||||
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
|
||||
|
||||
Reference in new issue
Block a user