From 3a6bedf1e5f8ef32243e86fa753c6433a22b936d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 22 Mar 2020 10:30:10 +0100 Subject: sim: When decoding SW, take application specific SW into account So far we only looked at SW definitions of the card profile. However, if we have a currently selected application, we also must check that application for SW definitions. This breaks ABI and API all over the place, but as there are no known users beyond osmo-sim-test, this is acceptable. Change-Id: I3a1d60898529c173f73587e34c155660ba5f5fb1 --- utils/osmo-sim-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c index cf423c49..ae55b83e 100644 --- a/utils/osmo-sim-test.c +++ b/utils/osmo-sim-test.c @@ -411,7 +411,7 @@ static int dump_file(struct osim_chan_hdl *chan, const char *short_name, uint16_ fclose(f_data); return -EIO; } - printf("SW: %s\n", osim_print_sw(chan->card, msgb_apdu_sw(msg))); + printf("SW: %s\n", osim_print_sw(chan, msgb_apdu_sw(msg))); hex = osmo_hexdump_nospc(msgb_apdu_de(rmsg), msgb_apdu_le(rmsg)); printf("Rec %03u: %s\n", i+1, hex); @@ -593,7 +593,7 @@ static void iterate_apps(struct osim_chan_hdl *chan) osmo_hexdump_nospc(cah->aid, cah->aid_len)); continue; } - printf("SW: %s\n", osim_print_sw(chan->card, msgb_apdu_sw(msg))); + printf("SW: %s\n", osim_print_sw(chan, msgb_apdu_sw(msg))); chan->cur_app = cah; chan->cwd = cap->adf; -- cgit v1.2.3