summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/opencrypto/xform_md5.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_md5.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_md5.c')
-rw-r--r--freebsd/sys/opencrypto/xform_md5.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/freebsd/sys/opencrypto/xform_md5.c b/freebsd/sys/opencrypto/xform_md5.c
index fd69a1c7..47dfc75c 100644
--- a/freebsd/sys/opencrypto/xform_md5.c
+++ b/freebsd/sys/opencrypto/xform_md5.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),
@@ -59,17 +57,27 @@ static int MD5Update_int(void *, const u_int8_t *, u_int16_t);
/* Authentication instances */
struct auth_hash auth_hash_hmac_md5 = {
- CRYPTO_MD5_HMAC, "HMAC-MD5",
- MD5_HMAC_KEY_LEN, MD5_HASH_LEN, sizeof(MD5_CTX), MD5_HMAC_BLOCK_LEN,
- (void (*) (void *)) MD5Init, NULL, NULL, MD5Update_int,
- (void (*) (u_int8_t *, void *)) MD5Final
+ .type = CRYPTO_MD5_HMAC,
+ .name = "HMAC-MD5",
+ .keysize = MD5_HMAC_BLOCK_LEN,
+ .hashsize = MD5_HASH_LEN,
+ .ctxsize = sizeof(MD5_CTX),
+ .blocksize = MD5_HMAC_BLOCK_LEN,
+ .Init = (void (*) (void *)) MD5Init,
+ .Update = MD5Update_int,
+ .Final = (void (*) (u_int8_t *, void *)) MD5Final,
};
struct auth_hash auth_hash_key_md5 = {
- CRYPTO_MD5_KPDK, "Keyed MD5",
- NULL_HMAC_KEY_LEN, MD5_KPDK_HASH_LEN, sizeof(MD5_CTX), 0,
- (void (*)(void *)) MD5Init, NULL, NULL, MD5Update_int,
- (void (*)(u_int8_t *, void *)) MD5Final
+ .type = CRYPTO_MD5_KPDK,
+ .name = "Keyed MD5",
+ .keysize = 0,
+ .hashsize = MD5_KPDK_HASH_LEN,
+ .ctxsize = sizeof(MD5_CTX),
+ .blocksize = 0,
+ .Init = (void (*)(void *)) MD5Init,
+ .Update = MD5Update_int,
+ .Final = (void (*)(u_int8_t *, void *)) MD5Final,
};
/*