From 98c963b8791df99176df4f8cbf73be79dbe7dfd5 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Fri, 21 Sep 2012 10:11:29 +0200 Subject: [PATCH] make yk_challenge_response() take challenge as const --- ykcore/ykcore.c | 2 +- ykcore/ykcore.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5