]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Ensures OpenSSL compatibility with older versions of EVP API.
authorCaio B. Silva <caioboffo@gmail.com>
Mon, 16 Sep 2019 17:22:33 +0000 (14:22 -0300)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 2 Dec 2019 12:59:42 +0000 (13:59 +0100)
Signed-off-by: Caio B. Silva <caioboffo@gmail.com>
src/lxc/utils.c

index 68c134536b41bfbef544089907ee751a9fffb369..93de722c21f5c05e2b2c463f42cb740f0cb72681 100644 (file)
@@ -344,11 +344,11 @@ static int do_sha1_hash(const char *buf, int buflen, unsigned char *md_value, un
                return -1;
        }
 
-       mdctx = EVP_MD_CTX_new();
+       mdctx = EVP_MD_CTX_create();
        EVP_DigestInit_ex(mdctx, md, NULL);
        EVP_DigestUpdate(mdctx, buf, buflen);
        EVP_DigestFinal_ex(mdctx, md_value, md_len);
-       EVP_MD_CTX_free(mdctx);
+       EVP_MD_CTX_destroy(mdctx);
 
        return 0;
 }