summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/hmac/hmac.c
diff options
context:
space:
mode:
authorbeck <>2000-04-15 06:18:51 +0000
committerbeck <>2000-04-15 06:18:51 +0000
commitb608c7f2b175e121f2c22d53341a317153afdc8e (patch)
treee94b160b3fcd8180df79e4251d68d24d665f0195 /src/lib/libcrypto/hmac/hmac.c
parentc8d6701c396cebdcd0d45eac73b762e9498f6b01 (diff)
downloadopenbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.tar.gz
openbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.tar.bz2
openbsd-b608c7f2b175e121f2c22d53341a317153afdc8e.zip
OpenSSL 0.9.5a merge
Diffstat (limited to 'src/lib/libcrypto/hmac/hmac.c')
-rw-r--r--src/lib/libcrypto/hmac/hmac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/hmac/hmac.c b/src/lib/libcrypto/hmac/hmac.c
index 23b7c98f8f..e1ec79e093 100644
--- a/src/lib/libcrypto/hmac/hmac.c
+++ b/src/lib/libcrypto/hmac/hmac.c
@@ -88,9 +88,11 @@ void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
88 else 88 else
89 { 89 {
90 memcpy(ctx->key,key,len); 90 memcpy(ctx->key,key,len);
91 memset(&(ctx->key[len]),0,sizeof(ctx->key)-len);
92 ctx->key_length=len; 91 ctx->key_length=len;
93 } 92 }
93 if(ctx->key_length != HMAC_MAX_MD_CBLOCK)
94 memset(&ctx->key[ctx->key_length], 0,
95 HMAC_MAX_MD_CBLOCK - ctx->key_length);
94 } 96 }
95 97
96 if (reset) 98 if (reset)