From 08f9145f17d26f4722e59706b6fd18cc88a6f5ff Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Wed, 27 Aug 2025 21:37:14 -0700 Subject: [PATCH] Pass in MLDSA auth context --- .../Sources/SecureEnclaveSecretKit/SecureEnclaveStore.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/Packages/Sources/SecureEnclaveSecretKit/SecureEnclaveStore.swift b/Sources/Packages/Sources/SecureEnclaveSecretKit/SecureEnclaveStore.swift index 737ac5d..c57b712 100644 --- a/Sources/Packages/Sources/SecureEnclaveSecretKit/SecureEnclaveStore.swift +++ b/Sources/Packages/Sources/SecureEnclaveSecretKit/SecureEnclaveStore.swift @@ -76,11 +76,11 @@ extension SecureEnclave { return try key.signature(for: data).rawRepresentation case .mldsa65: guard #available(macOS 26.0, *) else { throw UnsupportedAlgorithmError() } - let key = try CryptoKit.SecureEnclave.MLDSA65.PrivateKey(dataRepresentation: keyData) + let key = try CryptoKit.SecureEnclave.MLDSA65.PrivateKey(dataRepresentation: keyData, authenticationContext: context) return try key.signature(for: data) case .mldsa87: guard #available(macOS 26.0, *) else { throw UnsupportedAlgorithmError() } - let key = try CryptoKit.SecureEnclave.MLDSA87.PrivateKey(dataRepresentation: keyData) + let key = try CryptoKit.SecureEnclave.MLDSA87.PrivateKey(dataRepresentation: keyData, authenticationContext: context) return try key.signature(for: data) default: throw UnsupportedAlgorithmError() @@ -197,7 +197,6 @@ extension SecureEnclave { [.ecdsa256] } } - } }