projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a6911b
)
[CRYPTO]: Fix hmac_digest from the SG breakage.
author
Vlad Yasevich
<
[email protected]
>
Fri, 26 Oct 2007 01:46:26 +0000
(18:46 -0700)
committer
David S. Miller
<
[email protected]
>
Fri, 26 Oct 2007 01:46:26 +0000
(18:46 -0700)
Crypto now uses SG helper functions. Fix hmac_digest to use those
functions correctly and fix the oops associated with it.
Signed-off-by: Vlad Yasevich <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
crypto/hmac.c
patch
|
blob
|
history
diff --git
a/crypto/hmac.c
b/crypto/hmac.c
index 6691981bda1147ec22171791cada8e334e1d29f7..e3f5c0f3e2f74ce2465b762e0aad594c833dbb8b 100644
(file)
--- a/
crypto/hmac.c
+++ b/
crypto/hmac.c
@@
-158,9
+158,11
@@
static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
desc.tfm = ctx->child;
desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
+ sg_init_table(sg1, 2);
sg_set_buf(sg1, ipad, bs);
+ sg_set_page(&sg1[1], (void *) sg, 0, 0);
- sg_
set_page(&sg[1], (void *) sg, 0, 0
);
+ sg_
init_table(sg2, 1
);
sg_set_buf(sg2, opad, bs + ds);
err = crypto_hash_digest(&desc, sg1, nbytes + bs, digest);