Rename HMAC_BLOCK_MAXLEN to HMAC_MAX_BLOCK_LEN to be consistent with
EALG_MAX_BLOCK_LEN.
This commit is contained in:
parent
ec1159e0d5
commit
2eba50f53d
@ -71,7 +71,6 @@
|
||||
#define SHA2_512_HASH_LEN 64
|
||||
#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 */
|
||||
|
||||
@ -84,7 +83,8 @@
|
||||
#define SHA2_384_HMAC_BLOCK_LEN 128
|
||||
#define SHA2_512_HMAC_BLOCK_LEN 128
|
||||
#define HMAC_BLOCK_LEN 64
|
||||
#define HMAC_BLOCK_MAXLEN 128
|
||||
/* Maximum HMAC block length */
|
||||
#define HMAC_MAX_BLOCK_LEN SHA2_512_HMAC_BLOCK_LEN /* Keep this updated */
|
||||
#define HMAC_IPAD_VAL 0x36
|
||||
#define HMAC_OPAD_VAL 0x5C
|
||||
|
||||
|
@ -1030,11 +1030,11 @@ swcr_init(void)
|
||||
{
|
||||
u_int i;
|
||||
|
||||
hmac_ipad_buffer = malloc(HMAC_BLOCK_MAXLEN, M_CRYPTO_DATA, M_WAITOK);
|
||||
for (i = 0; i < HMAC_BLOCK_MAXLEN; i++)
|
||||
hmac_ipad_buffer = malloc(HMAC_MAX_BLOCK_LEN, M_CRYPTO_DATA, M_WAITOK);
|
||||
for (i = 0; i < HMAC_MAX_BLOCK_LEN; i++)
|
||||
hmac_ipad_buffer[i] = HMAC_IPAD_VAL;
|
||||
hmac_opad_buffer = malloc(HMAC_BLOCK_MAXLEN, M_CRYPTO_DATA, M_WAITOK);
|
||||
for (i = 0; i < HMAC_BLOCK_MAXLEN; i++)
|
||||
hmac_opad_buffer = malloc(HMAC_MAX_BLOCK_LEN, M_CRYPTO_DATA, M_WAITOK);
|
||||
for (i = 0; i < HMAC_MAX_BLOCK_LEN; i++)
|
||||
hmac_opad_buffer[i] = HMAC_OPAD_VAL;
|
||||
|
||||
swcr_id = crypto_get_driverid(CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_SYNC);
|
||||
|
Loading…
Reference in New Issue
Block a user