Really add the EVP and all of the DES changes.
[openssl.git] / crypto / evp / p5_crpt2.c
index f69c1a4408e42e3880d0aae1d6bd638163646d5c..645409e918020908979ead88f04bf97d019ded5e 100644 (file)
@@ -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);