]> err.no Git - yubikey-personalization.old/commitdiff
yubikey.h requires char *, cast to silence warning
authorClemens Lang <neverpanic@gmail.com>
Sat, 18 Feb 2012 16:53:00 +0000 (17:53 +0100)
committerClemens Lang <neverpanic@gmail.com>
Sat, 18 Feb 2012 16:53:00 +0000 (17:53 +0100)
yubikey.h from yubico-c defines yubikey_hex_*() to have a char * as first
parameter, where we use unisgned char[] here. Add a cast to silence the
warning this generates.

ykchalresp.c

index cecfecdeadead2fd31ff131ddf4e55a0f5d93ef4..f8bc188b67c7b2665976c16f8db39cfef499059e 100644 (file)
@@ -237,9 +237,9 @@ int challenge_response(YK_KEY *yk, int slot,
 
        memset(output_buf, 0, sizeof(output_buf));
        if (hmac) {
-               yubikey_hex_encode(output_buf, (char *)response, response_len);
+               yubikey_hex_encode((char *)output_buf, (char *)response, response_len);
        } else {
-               yubikey_modhex_encode(output_buf, (char *)response, response_len);
+               yubikey_modhex_encode((char *)output_buf, (char *)response, response_len);
        }
        printf("%s\n", output_buf);