aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/p5_crpt2.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/p5_crpt2.c')
-rw-r--r--crypto/evp/p5_crpt2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/evp/p5_crpt2.c b/crypto/evp/p5_crpt2.c
index f69c1a4408..645409e918 100644
--- a/crypto/evp/p5_crpt2.c
+++ b/crypto/evp/p5_crpt2.c
@@ -84,6 +84,8 @@ int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
int cplen, j, k, tkeylen;
unsigned long i = 1;
HMAC_CTX hctx;
+
+ HMAC_CTX_init(&hctx);
p = out;
tkeylen = keylen;
if(!pass) passlen = 0;
@@ -112,7 +114,7 @@ int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
i++;
p+= cplen;
}
- HMAC_cleanup(&hctx);
+ HMAC_CTX_cleanup(&hctx);
#ifdef DEBUG_PKCS5V2
fprintf(stderr, "Password:\n");
h__dump (pass, passlen);