Skip to content

Commit

Permalink
MDEV-15513 use EVP_MD_CTX_{new,free} instead of EVP_MD_CTX_{create, d…
Browse files Browse the repository at this point in the history
…estroy}

for consistency with EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free().

As the EVP_DIGESTINIT(3) man page says:

EVP_MD_CTX_create() and EVP_MD_CTX_destroy() were renamed to
EVP_MD_CTX_new() and EVP_MD_CTX_free() in OpenSSL 1.1.

Closes #621
  • Loading branch information
0xAX authored and vaintroub committed May 21, 2018
1 parent f51e5e4 commit 00eb5bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mysys_ssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ int check_openssl_compatibility()
return 1;

alloc_size= alloc_count= 0;
md5_ctx= EVP_MD_CTX_create();
EVP_MD_CTX_destroy(md5_ctx);
md5_ctx= EVP_MD_CTX_new();
EVP_MD_CTX_free(md5_ctx);
if (alloc_count != 1 || !alloc_size || alloc_size > EVP_MD_CTX_SIZE)
return 1;

Expand Down

0 comments on commit 00eb5bf

Please sign in to comment.