diff options
author | Linus Nordberg <linus@nordberg.se> | 2013-05-06 11:12:50 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2013-05-06 11:12:50 +0200 |
commit | 51f100ea69640adc70882ee5bc07229fb2d47249 (patch) | |
tree | 7799c2fdf997b72e61175217bfd811599b4e3c95 | |
parent | 22084e152eaf06f27808790279da087256195b08 (diff) |
Verify a single hash/hmac in the tests, not two.
-rw-r--r-- | tests/t_fticks.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/t_fticks.c b/tests/t_fticks.c index cece6a8..c7c6ab6 100644 --- a/tests/t_fticks.c +++ b/tests/t_fticks.c @@ -1,6 +1,5 @@ -/* Copyright (C) 2011 NORDUnet A/S - * See LICENSE for information about licensing. - */ +/* Copyright (C) 2011,2013, NORDUnet A/S */ +/* See LICENSE for licensing information. */ #include <stdio.h> #include <errno.h> @@ -11,7 +10,7 @@ static int _check_hash(const char *mac, const char *key, const char *hash, const char*hmac) { int rv = 0; - uint8_t buf[128]; + uint8_t buf[64+1]; if (fticks_hashmac((const uint8_t *) mac, NULL, sizeof(buf), buf) != 0) return -ENOMEM; @@ -31,8 +30,8 @@ _check_hash(const char *mac, const char *key, const char *hash, const char*hmac) #define MAC1_APPENDED "00:23:14:0a:f7:24;cruft" #define MAC1_WEIRD "00:23:-[?xyzzy!]-14:0a:f7:24" #define KEY1 "magic passphrase" -#define HASH1 "29c0ee9d9c41771795a11ff75fefe9f5ccaab523ad31fc4fd8e776c707ad158129c0ee9d9c41771795a11ff75fefe9f5ccaab523ad31fc4fd8e776c707ad15" -#define HMAC1 "57c8cd8031142c51ac9747370f48a5aa731006729d0cdf589ba101864f35f39057c8cd8031142c51ac9747370f48a5aa731006729d0cdf589ba101864f35f3" +#define HASH1 "29c0ee9d9c41771795a11ff75fefe9f5ccaab523ad31fc4fd8e776c707ad1581" +#define HMAC1 "57c8cd8031142c51ac9747370f48a5aa731006729d0cdf589ba101864f35f390" int main (int argc, char *argv[]) |