This commit is contained in:
Max Goedjen
2025-09-06 15:24:23 -07:00
parent 30bb29d153
commit 11074999ad
4 changed files with 29 additions and 6 deletions

View File

@@ -93,7 +93,8 @@ extension Agent {
/// - Returns: An OpenSSH formatted Data payload containing the signed data response.
func sign(data: Data, keyBlob: Data, provenance: SigningRequestProvenance) async throws -> Data {
guard let (secret, store) = await secret(matching: keyBlob) else {
logger.debug("Agent did not have a key matching \(keyBlob as NSData)")
let keyBlobHex = keyBlob.compactMap { ("0" + String($0, radix: 16, uppercase: false)).suffix(2) }.joined()
logger.debug("Agent did not have a key matching \(keyBlobHex)")
throw NoMatchingKeyError()
}