]> err.no Git - yubikey-personalization/commitdiff
make yk_challenge_response() take challenge as const
authorKlas Lindfors <klas@yubico.com>
Fri, 21 Sep 2012 08:11:29 +0000 (10:11 +0200)
committerKlas Lindfors <klas@yubico.com>
Fri, 21 Sep 2012 08:11:29 +0000 (10:11 +0200)
ykcore/ykcore.c
ykcore/ykcore.h

index f7a2201a8aacac10af1e28ab72d115022816e705..21a51b3f8b2a7854e8708f82545e3cb2c49095bc 100644 (file)
@@ -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;
index 74f9bb00a30b797394121a0a64ef5a2524a96845..736bae758bd0b14e672855c8cf2ded9032848655 100644 (file)
@@ -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);