diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | examples/Makefile | 3 | ||||
-rw-r--r-- | examples/hmac.c | 5 |
3 files changed, 7 insertions, 2 deletions
@@ -15,6 +15,7 @@ install: clean: make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean rm -f $(hostprogs) + KERNEL_DIR=$(KERNEL_DIR) make -C examples clean check: KERNEL_DIR=$(KERNEL_DIR) make -C examples check diff --git a/examples/Makefile b/examples/Makefile index eb50a5f..601fb07 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -7,3 +7,6 @@ example-hmac-objs := hmac.o check: $(hostprogs) ./cipher ./hmac + +clean: + rm -f *.o *~ hmac cipher diff --git a/examples/hmac.c b/examples/hmac.c index e652c1e..9975792 100644 --- a/examples/hmac.c +++ b/examples/hmac.c @@ -15,6 +15,7 @@ #define DATA_SIZE 4096 #define BLOCK_SIZE 16 #define KEY_SIZE 16 +#define SHA1_HASH_LEN 20 static int test_crypto(int cfd) @@ -28,8 +29,8 @@ test_crypto(int cfd) } data; struct session_op sess; struct crypt_op cryp; - uint8_t mac[HASH_MAX_LEN]; - uint8_t oldmac[HASH_MAX_LEN]; + uint8_t mac[AALG_MAX_RESULT_LEN]; + uint8_t oldmac[AALG_MAX_RESULT_LEN]; uint8_t md5_hmac_out[] = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38"; uint8_t sha1_out[] = "\x8f\x82\x03\x94\xf9\x53\x35\x18\x20\x45\xda\x24\xf3\x4d\xe5\x2b\xf8\xbc\x34\x32"; int i; |