From e4a8065910cd6b2e7e0448cc6431ca2906322389 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 9 Aug 2018 13:04:41 +0200 Subject: Update to FreeBSD head 2017-10-01 Git mirror commit b2f0376b45428f13151d229c5ae9d4d8f74acbd1. Update #3472. --- freebsd/sys/opencrypto/xform_sha1.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'freebsd/sys/opencrypto/xform_sha1.c') diff --git a/freebsd/sys/opencrypto/xform_sha1.c b/freebsd/sys/opencrypto/xform_sha1.c index 76489048..974dfb8a 100644 --- a/freebsd/sys/opencrypto/xform_sha1.c +++ b/freebsd/sys/opencrypto/xform_sha1.c @@ -1,5 +1,3 @@ -#include - /* $OpenBSD: xform.c,v 1.16 2001/08/28 12:20:43 ben Exp $ */ /*- * The authors of this code are John Ioannidis (ji@tla.org), @@ -61,15 +59,27 @@ static void SHA1Final_int(u_int8_t *, void *); /* Authentication instances */ struct auth_hash auth_hash_hmac_sha1 = { - CRYPTO_SHA1_HMAC, "HMAC-SHA1", - SHA1_HMAC_KEY_LEN, SHA1_HASH_LEN, sizeof(SHA1_CTX), SHA1_HMAC_BLOCK_LEN, - SHA1Init_int, NULL, NULL, SHA1Update_int, SHA1Final_int + .type = CRYPTO_SHA1_HMAC, + .name = "HMAC-SHA1", + .keysize = SHA1_HMAC_BLOCK_LEN, + .hashsize = SHA1_HASH_LEN, + .ctxsize = sizeof(SHA1_CTX), + .blocksize = SHA1_HMAC_BLOCK_LEN, + .Init = SHA1Init_int, + .Update = SHA1Update_int, + .Final = SHA1Final_int, }; struct auth_hash auth_hash_key_sha1 = { - CRYPTO_SHA1_KPDK, "Keyed SHA1", - NULL_HMAC_KEY_LEN, SHA1_KPDK_HASH_LEN, sizeof(SHA1_CTX), 0, - SHA1Init_int, NULL, NULL, SHA1Update_int, SHA1Final_int + .type = CRYPTO_SHA1_KPDK, + .name = "Keyed SHA1", + .keysize = 0, + .hashsize = SHA1_KPDK_HASH_LEN, + .ctxsize = sizeof(SHA1_CTX), + .blocksize = 0, + .Init = SHA1Init_int, + .Update = SHA1Update_int, + .Final = SHA1Final_int, }; /* -- cgit v1.2.3