git.samba.org
/
abartlet
/
lorikeet-heimdal.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f26d6c2
)
memset the right length of the {i,o}pad data, memset opad not ipad in the opad case...
author
Andrew Tridge
<tridge@samba.org>
Thu, 18 Mar 2010 17:59:51 +0000
(10:59 -0700)
committer
Love Hornquist Astrand
<lha@h5l.org>
Thu, 18 Mar 2010 17:59:51 +0000
(10:59 -0700)
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
lib/hcrypto/hmac.c
patch
|
blob
|
history
diff --git
a/lib/hcrypto/hmac.c
b/lib/hcrypto/hmac.c
index dcd836d0be3b9c861089c6ca311dfd0b12fbdcb1..d11bd9876988332142290dd3dabcc45ac4bea57c 100644
(file)
--- a/
lib/hcrypto/hmac.c
+++ b/
lib/hcrypto/hmac.c
@@
-52,12
+52,12
@@
HMAC_CTX_cleanup(HMAC_CTX *ctx)
ctx->buf = NULL;
}
if (ctx->opad) {
- memset(ctx->
ipad, 0, ctx->key_length
);
+ memset(ctx->
opad, 0, EVP_MD_block_size(ctx->md)
);
free(ctx->opad);
ctx->opad = NULL;
}
if (ctx->ipad) {
- memset(ctx->ipad, 0,
ctx->key_length
);
+ memset(ctx->ipad, 0,
EVP_MD_block_size(ctx->md)
);
free(ctx->ipad);
ctx->ipad = NULL;
}