diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2023-05-01 04:36:36 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2023-05-01 04:36:36 +0200 |
commit | 3cf5fc2e2f640a7ad0466b8b5a9bc0108521aa01 (patch) | |
tree | 6ec5aee8a84b7fbf8714ea81e07f28137b8a6596 /scd/command.c | |
parent | Post release updates (diff) | |
download | gnupg2-3cf5fc2e2f640a7ad0466b8b5a9bc0108521aa01.tar.xz gnupg2-3cf5fc2e2f640a7ad0466b8b5a9bc0108521aa01.zip |
scd: Fix cmd_apdu on error.
* scd/command.c (cmd_apdu): Fix the code path on error.
--
GnuPG-bug-id: 6476
Reported-by: Robin Krahl
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to '')
-rw-r--r-- | scd/command.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c index 635bb350e..0cf66d08c 100644 --- a/scd/command.c +++ b/scd/command.c @@ -2200,7 +2200,10 @@ cmd_apdu (assuan_context_t ctx, char *line) apdu, apdulen, handle_more, NULL, &result, &resultlen); if (rc) - log_error ("apdu_send_direct failed: %s\n", gpg_strerror (rc)); + { + log_error ("apdu_send_direct failed: %s\n", apdu_strerror (rc)); + rc = iso7816_map_sw (rc); + } else { rc = assuan_send_data (ctx, result, resultlen); |