aboutsummaryrefslogtreecommitdiffstats
path: root/scd/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'scd/command.c')
-rw-r--r--scd/command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c
index 0f0c6c9df..0cf66d08c 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -2195,11 +2195,15 @@ cmd_apdu (assuan_context_t ctx, char *line)
unsigned char *result = NULL;
size_t resultlen;
+ card->maybe_check_aid = 1;
rc = apdu_send_direct (card->slot, exlen,
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);