Use more constant for filling apdu struct.

This commit is contained in:
Michael Scherer
2016-05-05 00:18:20 +02:00
committed by Michael Scherer
parent 1a525f7ed7
commit 6a4608ff05
+3 -3
View File
@@ -390,9 +390,9 @@ ykpiv_rc ykpiv_authenticate(ykpiv_state *state, unsigned const char *key) {
/* get a challenge from the card */ /* get a challenge from the card */
{ {
memset(apdu.raw, 0, sizeof(apdu)); memset(apdu.raw, 0, sizeof(apdu));
apdu.st.ins = 0x87; apdu.st.ins = YKPIV_INS_AUTHENTICATE;
apdu.st.p1 = 0x03; /* triple des */ apdu.st.p1 = YKPIV_ALGO_3DES; /* triple des */
apdu.st.p2 = 0x9b; /* management key */ apdu.st.p2 = YKPIV_KEY_CARDMGM; /* management key */
apdu.st.lc = 0x04; apdu.st.lc = 0x04;
apdu.st.data[0] = 0x7c; apdu.st.data[0] = 0x7c;
apdu.st.data[1] = 0x02; apdu.st.data[1] = 0x02;