From 888c7d7ab6871c41f738119352218a0046dc7e2f Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Mon, 12 Apr 2010 07:34:47 +0000 Subject: [PATCH] added code for reading cardsecurity git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@65 96b47cad-a561-4643-ad3b-153ac7d7599c --- ccid/pace.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ccid/pace.c b/ccid/pace.c index 76adadb..31a1e0b 100644 --- a/ccid/pace.c +++ b/ccid/pace.c @@ -832,17 +832,28 @@ int pace_test(sc_card_t *card) apdu.ins = 0xA4; apdu.p1 = 0x08; apdu.p2 = 0x00; - apdu.lc = 0x02; in[0] = 0x01; in[1] = 0x1D; apdu.data = in; apdu.datalen = 2; + apdu.lc = apdu.datalen; apdu.le = 0x00; apdu.cse = SC_APDU_CASE_4_SHORT; /*increment_ssc(&sctx);*/ sm_transmit_apdu(&sctx, card, &apdu); + /* read CardSecurity */ + apdu.cla = 0x00; + apdu.ins = 0xB0; + apdu.p1 = 0x02; + apdu.p2 = 0x00; + apdu.le = 0x00; + apdu.cse = SC_APDU_CASE_2_SHORT; + + increment_ssc(&sctx); + sm_transmit_apdu(&sctx, card, &apdu); + return SC_SUCCESS; }