added code for reading cardsecurity
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@65 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
13
ccid/pace.c
13
ccid/pace.c
@@ -832,17 +832,28 @@ int pace_test(sc_card_t *card)
|
|||||||
apdu.ins = 0xA4;
|
apdu.ins = 0xA4;
|
||||||
apdu.p1 = 0x08;
|
apdu.p1 = 0x08;
|
||||||
apdu.p2 = 0x00;
|
apdu.p2 = 0x00;
|
||||||
apdu.lc = 0x02;
|
|
||||||
in[0] = 0x01;
|
in[0] = 0x01;
|
||||||
in[1] = 0x1D;
|
in[1] = 0x1D;
|
||||||
apdu.data = in;
|
apdu.data = in;
|
||||||
apdu.datalen = 2;
|
apdu.datalen = 2;
|
||||||
|
apdu.lc = apdu.datalen;
|
||||||
apdu.le = 0x00;
|
apdu.le = 0x00;
|
||||||
apdu.cse = SC_APDU_CASE_4_SHORT;
|
apdu.cse = SC_APDU_CASE_4_SHORT;
|
||||||
|
|
||||||
/*increment_ssc(&sctx);*/
|
/*increment_ssc(&sctx);*/
|
||||||
sm_transmit_apdu(&sctx, card, &apdu);
|
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;
|
return SC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user