aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-04-05 12:45:05 +0000
committerWerner Koch <[email protected]>2024-04-05 12:47:02 +0000
commit68d9bc9c35bb65375430c1861514a72fd7d7549a (patch)
tree86027a42b6f286178e1cff5b83e240aeb4d59cfd /agent/command.c
parentgpg: Support dual keygrips. (diff)
downloadgnupg-68d9bc9c35bb65375430c1861514a72fd7d7549a.tar.gz
gnupg-68d9bc9c35bb65375430c1861514a72fd7d7549a.zip
agent: Fix error handling of READKEY.
* agent/command.c (cmd_readkey): Jump to leave on reading error. -- Fixes-commit: d7a3c455c5e29b19b66772f86dda925064e34896
Diffstat (limited to 'agent/command.c')
-rw-r--r--agent/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/agent/command.c b/agent/command.c
index 2fd9a85d4..b152a5ea4 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -1458,7 +1458,9 @@ cmd_readkey (assuan_context_t ctx, char *line)
goto leave;
rc = agent_public_key_from_file (ctrl, grip, &s_pkey);
- if (!rc)
+ if (rc)
+ goto leave;
+ else
{
if (opt_format_ssh)
{