diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-09-19 20:55:54 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-10-26 19:09:23 +0100 |
commit | 7674960ffadd5d7cb1a58ecee77252fe19e1e86f (patch) | |
tree | 3f18d49d9cc6643a7cfb0547039ea10c4ff1918e /utils | |
parent | 43eabeeeaa993b6628e0490fbf6b78f24cee4788 (diff) |
sim: add decoding of status words
Diffstat (limited to 'utils')
-rw-r--r-- | utils/osmo-sim-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c index 482ca31e..df114de5 100644 --- a/utils/osmo-sim-test.c +++ b/utils/osmo-sim-test.c @@ -297,6 +297,7 @@ static int dump_file(struct osim_chan_hdl *chan, uint16_t fid) printf("Unable to select file\n"); return -EIO; } + printf("SW: %s\n", osim_print_sw(chan->card, msgb_apdu_sw(msg))); if (msgb_apdu_sw(msg) != 0x9000) { printf("status 0x%04x selecting file\n", msgb_apdu_sw(msg)); goto out; @@ -334,6 +335,7 @@ static int dump_file(struct osim_chan_hdl *chan, uint16_t fid) rmsg = read_record_nr(chan, i+1, ffdd.rec_len); if (!msg) return -EIO; + printf("SW: %s\n", osim_print_sw(chan->card, msgb_apdu_sw(msg))); printf("Rec %03u: %s\n", i+1, osmo_hexdump(msgb_apdu_de(rmsg), msgb_apdu_le(rmsg))); } @@ -390,6 +392,7 @@ int main(int argc, char **argv) msg = select_file(chan, 0x6fc5); dump_fcp_template_msg(msg); + printf("SW: %s\n", osim_print_sw(chan->card, msgb_apdu_sw(msg))); msgb_free(msg); verify_pin(chan, 1, "1653"); |