1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

agent: Silence error messages for READKEY --card

* agent/command.c (cmd_readkey): Test for shadow key before creating
it.

(cherry picked from commit 8f2c9cb73538baab7da8107f2cceb2f6fc49642a)
This commit is contained in:
Werner Koch 2021-04-21 21:00:28 +02:00
parent 2af217ecd7
commit aa612d752e
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 9 additions and 6 deletions

View File

@ -1030,9 +1030,13 @@ cmd_readkey (assuan_context_t ctx, char *line)
goto leave;
}
if (agent_key_available (grip))
{
/* (Shadow)-key is not available in our key storage. */
rc = agent_write_shadow_key (grip, serialno, keyid, pkbuf, 0);
if (rc)
goto leave;
}
rc = assuan_send_data (ctx, pkbuf, pkbuflen);
}

View File

@ -44,9 +44,8 @@ convention. Example (here indented with two spaces):
(#D2760001240102000005000011730000# OPENPGP.1)
)))
GnuPG 2.2 is able to read and update keys using the new format, but
will not create new files using the new format. Furthermore, it only
makes use of the value stored under the name 'Key:'.
GnuPG 2.2 is also able to read and write keys using the new format
However, it only makes use of the value stored under the name 'Key:'.
Keys in the extended format can be recognized by looking at the first
byte of the file. If it starts with a '(' it is a naked S-expression,