mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-08-26 23:20:57 +00:00
.
This commit is contained in:
parent
bfa7a3cd51
commit
7c5c2924fa
@ -66,6 +66,9 @@ extension SmartCard {
|
|||||||
|
|
||||||
public func sign(data: Data, with secret: Secret, for provenance: SigningRequestProvenance) async throws -> Data {
|
public func sign(data: Data, with secret: Secret, for provenance: SigningRequestProvenance) async throws -> Data {
|
||||||
guard let tokenID = await state.tokenID else { fatalError() }
|
guard let tokenID = await state.tokenID else { fatalError() }
|
||||||
|
guard secret.capabilities.contains(.signature) else {
|
||||||
|
throw SigningError(error: nil)
|
||||||
|
}
|
||||||
let context = LAContext()
|
let context = LAContext()
|
||||||
context.localizedReason = String(localized: .authContextRequestSignatureDescription(appName: provenance.origin.displayName, secretName: secret.name))
|
context.localizedReason = String(localized: .authContextRequestSignatureDescription(appName: provenance.origin.displayName, secretName: secret.name))
|
||||||
context.localizedCancelTitle = String(localized: .authContextRequestDenyButton)
|
context.localizedCancelTitle = String(localized: .authContextRequestDenyButton)
|
||||||
|
Loading…
Reference in New Issue
Block a user