From: Klas Lindfors Date: Fri, 21 Sep 2012 08:11:29 +0000 (+0200) Subject: make yk_challenge_response() take challenge as const X-Git-Tag: v1.8.0~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98c963b8791df99176df4f8cbf73be79dbe7dfd5;p=yubikey-personalization make yk_challenge_response() take challenge as const --- diff --git a/ykcore/ykcore.c b/ykcore/ykcore.c index f7a2201..21a51b3 100644 --- a/ykcore/ykcore.c +++ b/ykcore/ykcore.c @@ -281,7 +281,7 @@ int yk_write_ndef(YK_KEY *yk, YK_NDEF *ndef) * This function is for doing HMAC-SHA1 or Yubico challenge-response with a key. */ int yk_challenge_response(YK_KEY *yk, uint8_t yk_cmd, int may_block, - unsigned int challenge_len, unsigned char *challenge, + unsigned int challenge_len, const unsigned char *challenge, unsigned int response_len, unsigned char *response) { unsigned int flags = 0; diff --git a/ykcore/ykcore.h b/ykcore/ykcore.h index 74f9bb0..736bae7 100644 --- a/ykcore/ykcore.h +++ b/ykcore/ykcore.h @@ -121,7 +121,7 @@ extern int yk_write_ndef(YK_KEY *yk, YK_NDEF *ndef); extern int yk_write_to_key(YK_KEY *yk, uint8_t slot, const void *buf, int bufcount); /* Do a challenge-response round with the key. */ extern int yk_challenge_response(YK_KEY *yk, uint8_t yk_cmd, int may_block, - unsigned int challenge_len, unsigned char *challenge, + unsigned int challenge_len, const unsigned char *challenge, unsigned int response_len, unsigned char *response); extern int yk_force_key_update(YK_KEY *yk);