Skip to content

Commit 532fb68

Browse files
authored
SecIdentityCreateWithCertificate is available on macOS only (#6239)
1 parent 625d438 commit 532fb68

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Sources/PackageSigning/SigningIdentity.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public struct SigningIdentityStore {
8080
}
8181

8282
public func find(by label: String) async -> [SigningIdentity] {
83-
#if canImport(Security)
83+
#if canImport(macOS)
8484
// Find in Keychain
8585
let query: [String: Any] = [
8686
// Use kSecClassCertificate instead of kSecClassIdentity because the latter

Tests/PackageSigningTests/SigningEntityTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ final class SigningEntityTests: XCTestCase {
5252
}
5353
}
5454

55-
#if canImport(Security)
55+
#if canImport(macOS)
5656
func testFromKeychainCertificate() async throws {
5757
#if ENABLE_REAL_SIGNING_IDENTITY_TEST
5858
#else

Tests/PackageSigningTests/SigningIdentityTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ final class SigningIdentityTests: XCTestCase {
7777
}
7878
}
7979

80-
#if canImport(Security)
80+
#if canImport(macOS)
8181
func testSigningIdentityFromKeychain() async throws {
8282
#if ENABLE_REAL_SIGNING_IDENTITY_TEST
8383
#else

Tests/PackageSigningTests/SigningTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ final class SigningTests: XCTestCase {
167167
}
168168
}
169169

170-
#if canImport(Security)
170+
#if canImport(macOS)
171171
func testCMS1_0_0EndToEndWithSigningIdentityFromKeychain() async throws {
172172
#if ENABLE_REAL_SIGNING_IDENTITY_TEST
173173
#else
@@ -215,7 +215,7 @@ final class SigningTests: XCTestCase {
215215
}
216216
#endif
217217

218-
#if canImport(Security)
218+
#if canImport(macOS)
219219
func testCMSEndToEndWithECSigningIdentityFromKeychain() async throws {
220220
#if ENABLE_REAL_SIGNING_IDENTITY_TEST
221221
#else
@@ -261,7 +261,7 @@ final class SigningTests: XCTestCase {
261261
}
262262
#endif
263263

264-
#if canImport(Security)
264+
#if canImport(macOS)
265265
func testCMSEndToEndWithRSASigningIdentityFromKeychain() async throws {
266266
#if ENABLE_REAL_SIGNING_IDENTITY_TEST
267267
#else

0 commit comments

Comments
 (0)