From 6e6c09fc01af43e145c605878a63112284461e20 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Fri, 11 Dec 2015 07:52:21 +0100 Subject: [PATCH] fixed wiping SM state when receiving protected APDU --- npa/src/iso-sm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npa/src/iso-sm.c b/npa/src/iso-sm.c index 3f47cb2..b3a4d0d 100644 --- a/npa/src/iso-sm.c +++ b/npa/src/iso-sm.c @@ -612,7 +612,7 @@ static int iso_add_sm(struct iso_sm_ctx *sctx, sc_card_t *card, if ((apdu->cla & 0x0C) == 0x0C) { sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "Given APDU is already protected with some secure messaging. Closing own SM context."); - SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, iso_sm_close(card), + SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, sc_sm_stop(card), "Could not close ISO SM session"); return SC_ERROR_SM_NOT_APPLIED; }