summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/opencrypto/xform_sha1.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-09 13:04:41 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 10:29:37 +0200
commite4a8065910cd6b2e7e0448cc6431ca2906322389 (patch)
tree73492991cfa40f994c20d761d476e6bc16304536 /freebsd/sys/opencrypto/xform_sha1.c
parentUpdate to FreeBSD head 2017-08-01 (diff)
downloadrtems-libbsd-e4a8065910cd6b2e7e0448cc6431ca2906322389.tar.bz2
Update to FreeBSD head 2017-10-01
Git mirror commit b2f0376b45428f13151d229c5ae9d4d8f74acbd1. Update #3472.
Diffstat (limited to 'freebsd/sys/opencrypto/xform_sha1.c')
-rw-r--r--freebsd/sys/opencrypto/xform_sha1.c26
1 files changed, 18 insertions, 8 deletions
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 <machine/rtems-bsd-kernel-space.h>
-
/* $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,
};
/*