From 6a4608ff057a032f910ef2b623d7b4091fe59f67 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Thu, 5 May 2016 00:18:20 +0200 Subject: [PATCH] Use more constant for filling apdu struct. --- lib/ykpiv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;