diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/hmac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/hmac.c b/crypto/hmac.c index e4eb6ac53b..e3f5c0f3e2 100644 --- a/crypto/hmac.c +++ b/crypto/hmac.c | |||
@@ -158,10 +158,11 @@ static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg, | |||
158 | desc.tfm = ctx->child; | 158 | desc.tfm = ctx->child; |
159 | desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP; | 159 | desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP; |
160 | 160 | ||
161 | sg_init_table(sg1, 2); | ||
161 | sg_set_buf(sg1, ipad, bs); | 162 | sg_set_buf(sg1, ipad, bs); |
163 | sg_set_page(&sg1[1], (void *) sg, 0, 0); | ||
162 | 164 | ||
163 | sg_set_page(&sg[1], (void *) sg); | 165 | sg_init_table(sg2, 1); |
164 | sg1[1].length = 0; | ||
165 | sg_set_buf(sg2, opad, bs + ds); | 166 | sg_set_buf(sg2, opad, bs + ds); |
166 | 167 | ||
167 | err = crypto_hash_digest(&desc, sg1, nbytes + bs, digest); | 168 | err = crypto_hash_digest(&desc, sg1, nbytes + bs, digest); |