From 7c5c2924fa4930f324831d924bf7a5352ba88d81 Mon Sep 17 00:00:00 2001 From: Max Goedjen Date: Sat, 23 Aug 2025 19:40:27 -0700 Subject: [PATCH] . --- .../Packages/Sources/SmartCardSecretKit/SmartCardStore.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Packages/Sources/SmartCardSecretKit/SmartCardStore.swift b/Sources/Packages/Sources/SmartCardSecretKit/SmartCardStore.swift index 4d8f42c..b25e2a1 100644 --- a/Sources/Packages/Sources/SmartCardSecretKit/SmartCardStore.swift +++ b/Sources/Packages/Sources/SmartCardSecretKit/SmartCardStore.swift @@ -66,6 +66,9 @@ extension SmartCard { public func sign(data: Data, with secret: Secret, for provenance: SigningRequestProvenance) async throws -> Data { guard let tokenID = await state.tokenID else { fatalError() } + guard secret.capabilities.contains(.signature) else { + throw SigningError(error: nil) + } let context = LAContext() context.localizedReason = String(localized: .authContextRequestSignatureDescription(appName: provenance.origin.displayName, secretName: secret.name)) context.localizedCancelTitle = String(localized: .authContextRequestDenyButton)