]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/pem/pvkfmt.c
Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)
[thirdparty/openssl.git] / crypto / pem / pvkfmt.c
index f062728932dca5e778cad85bd1c1317bcf9e5481..c95967cae122cf54da54530f57ec986e127ab279 100644 (file)
@@ -650,7 +650,7 @@ static int derive_pvk_key(unsigned char *key,
                           const unsigned char *salt, unsigned int saltlen,
                           const unsigned char *pass, int passlen)
 {
-    EVP_MD_CTX *mctx = EVP_MD_CTX_create();;
+    EVP_MD_CTX *mctx = EVP_MD_CTX_new();;
     int rv = 1;
     if (mctx == NULL
         || !EVP_DigestInit_ex(mctx, EVP_sha1(), NULL)
@@ -659,7 +659,7 @@ static int derive_pvk_key(unsigned char *key,
         || !EVP_DigestFinal_ex(mctx, key, NULL))
         rv = 0;
 
-    EVP_MD_CTX_destroy(mctx);
+    EVP_MD_CTX_free(mctx);
     return rv;
 }