From 66e5600b27c1aed04aa883d28b62658aa53f407e Mon Sep 17 00:00:00 2001 From: Vincent JARDIN Date: Mon, 1 Feb 2021 11:01:33 +0000 Subject: [PATCH] IASECC: log AID selection Record the selection of the AID for better debugging --- src/libopensc/card-iasecc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libopensc/card-iasecc.c b/src/libopensc/card-iasecc.c index 07a99f8c..166bc307 100644 --- a/src/libopensc/card-iasecc.c +++ b/src/libopensc/card-iasecc.c @@ -339,6 +339,8 @@ iasecc_select_aid(struct sc_card *card, struct sc_aid *aid, unsigned char *out, unsigned char apdu_resp[SC_MAX_APDU_BUFFER_SIZE]; int rv; + LOG_FUNC_CALLED(card->ctx); + /* Select application (deselect previously selected application) */ sc_format_apdu(card, &apdu, SC_APDU_CASE_4_SHORT, 0xA4, 0x04, 0x00); apdu.lc = aid->len; @@ -356,7 +358,7 @@ iasecc_select_aid(struct sc_card *card, struct sc_aid *aid, unsigned char *out, LOG_TEST_RET(card->ctx, SC_ERROR_BUFFER_TOO_SMALL, "Cannot select AID"); memcpy(out, apdu.resp, apdu.resplen); - return SC_SUCCESS; + LOG_FUNC_RETURN(card->ctx, SC_SUCCESS); }