aboutsummaryrefslogtreecommitdiff
path: root/sys/opencrypto
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2006-06-04 14:25:16 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2006-06-04 14:25:16 +0000
commit0bbc4bf97d7e7c831806506944b6b2d0f87ffde5 (patch)
treef3a73fa8fc38892b0817f48b7cc0863436e40233 /sys/opencrypto
parent9ea7e4210ff7850349a6bef16f595d1d3435535e (diff)
Notes
Diffstat (limited to 'sys/opencrypto')
-rw-r--r--sys/opencrypto/cryptodev.h6
-rw-r--r--sys/opencrypto/cryptosoft.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h
index bacecb3fab19..3664ceccff0d 100644
--- a/sys/opencrypto/cryptodev.h
+++ b/sys/opencrypto/cryptodev.h
@@ -72,6 +72,9 @@
#define MD5_KPDK_HASH_LEN 16
#define SHA1_KPDK_HASH_LEN 20
+/* Maximum hash algorithm result length */
+#define HASH_MAX_LEN SHA2_512_HASH_LEN /* Keep this updated */
+
/* HMAC values */
#define NULL_HMAC_BLOCK_LEN 64
#define MD5_HMAC_BLOCK_LEN 64
@@ -96,9 +99,6 @@
#define AES_BLOCK_LEN RIJNDAEL128_BLOCK_LEN
#define EALG_MAX_BLOCK_LEN 16 /* Keep this updated */
-/* Maximum hash algorithm result length */
-#define AALG_MAX_RESULT_LEN 64 /* Keep this updated */
-
#define CRYPTO_ALGORITHM_MIN 1
#define CRYPTO_DES_CBC 1
#define CRYPTO_3DES_CBC 2
diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c
index dd6714befc20..4d1eca042e02 100644
--- a/sys/opencrypto/cryptosoft.c
+++ b/sys/opencrypto/cryptosoft.c
@@ -473,7 +473,7 @@ static int
swcr_authcompute(struct cryptodesc *crd, struct swcr_data *sw, caddr_t buf,
int outtype)
{
- unsigned char aalg[AALG_MAX_RESULT_LEN];
+ unsigned char aalg[HASH_MAX_LEN];
struct auth_hash *axf;
union authctx ctx;
int err;