diff --git a/lib/ykpiv.c b/lib/ykpiv.c index adcbb0c..477582a 100644 --- a/lib/ykpiv.c +++ b/lib/ykpiv.c @@ -390,9 +390,9 @@ ykpiv_rc ykpiv_authenticate(ykpiv_state *state, unsigned const char *key) { /* get a challenge from the card */ { memset(apdu.raw, 0, sizeof(apdu)); - apdu.st.ins = 0x87; - apdu.st.p1 = 0x03; /* triple des */ - apdu.st.p2 = 0x9b; /* management key */ + apdu.st.ins = YKPIV_INS_AUTHENTICATE; + apdu.st.p1 = YKPIV_ALGO_3DES; /* triple des */ + apdu.st.p2 = YKPIV_KEY_CARDMGM; /* management key */ apdu.st.lc = 0x04; apdu.st.data[0] = 0x7c; apdu.st.data[1] = 0x02;