aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/hmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/hmac.c')
-rw-r--r--crypto/hmac.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/hmac.c b/crypto/hmac.c
index 46120dee5ada..ecf7b0a95b56 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -35,9 +35,9 @@ int crypto_alloc_hmac_block(struct crypto_tfm *tfm)
35 35
36 BUG_ON(!crypto_tfm_alg_blocksize(tfm)); 36 BUG_ON(!crypto_tfm_alg_blocksize(tfm));
37 37
38 tfm->crt_digest.dit_hmac_block = kmalloc(crypto_tfm_alg_blocksize(tfm), 38 tfm->crt_hash.hmac_block = kmalloc(crypto_tfm_alg_blocksize(tfm),
39 GFP_KERNEL); 39 GFP_KERNEL);
40 if (tfm->crt_digest.dit_hmac_block == NULL) 40 if (tfm->crt_hash.hmac_block == NULL)
41 ret = -ENOMEM; 41 ret = -ENOMEM;
42 42
43 return ret; 43 return ret;
@@ -46,14 +46,14 @@ int crypto_alloc_hmac_block(struct crypto_tfm *tfm)
46 46
47void crypto_free_hmac_block(struct crypto_tfm *tfm) 47void crypto_free_hmac_block(struct crypto_tfm *tfm)
48{ 48{
49 kfree(tfm->crt_digest.dit_hmac_block); 49 kfree(tfm->crt_hash.hmac_block);
50} 50}
51 51
52void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen) 52void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen)
53{ 53{
54 unsigned int i; 54 unsigned int i;
55 struct scatterlist tmp; 55 struct scatterlist tmp;
56 char *ipad = tfm->crt_digest.dit_hmac_block; 56 char *ipad = tfm->crt_hash.hmac_block;
57 57
58 if (*keylen > crypto_tfm_alg_blocksize(tfm)) { 58 if (*keylen > crypto_tfm_alg_blocksize(tfm)) {
59 hash_key(tfm, key, *keylen); 59 hash_key(tfm, key, *keylen);
@@ -83,7 +83,7 @@ void crypto_hmac_final(struct crypto_tfm *tfm, u8 *key,
83{ 83{
84 unsigned int i; 84 unsigned int i;
85 struct scatterlist tmp; 85 struct scatterlist tmp;
86 char *opad = tfm->crt_digest.dit_hmac_block; 86 char *opad = tfm->crt_hash.hmac_block;
87 87
88 if (*keylen > crypto_tfm_alg_blocksize(tfm)) { 88 if (*keylen > crypto_tfm_alg_blocksize(tfm)) {
89 hash_key(tfm, key, *keylen); 89 hash_key(tfm, key, *keylen);