2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Use thinner shims for OpenSSL's EVP_MD_CTX_new() and EVP_MD_CTX_free()

The EVP_MD_CTX_new() and EVP_MD_CTX_free() functions are renamed APIs
which were previously available as EVP_MD_CTX_create() and
EVP_MD_CTX_destroy() respectively, which means that we can use them
instead of providing our own shim functions.
This commit is contained in:
Aram Sargsyan
2021-09-04 18:33:25 +00:00
parent 2563afb920
commit 2a6febd5d2
2 changed files with 2 additions and 25 deletions

View File

@@ -51,27 +51,6 @@ EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) {
}
#endif /* if !HAVE_EVP_CIPHER_CTX_FREE */
#if !HAVE_EVP_MD_CTX_NEW
EVP_MD_CTX *
EVP_MD_CTX_new(void) {
EVP_MD_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));
if (ctx != NULL) {
memset(ctx, 0, sizeof(*ctx));
}
return (ctx);
}
#endif /* if !HAVE_EVP_MD_CTX_NEW */
#if !HAVE_EVP_MD_CTX_FREE
void
EVP_MD_CTX_free(EVP_MD_CTX *ctx) {
if (ctx != NULL) {
EVP_MD_CTX_cleanup(ctx);
OPENSSL_free(ctx);
}
}
#endif /* if !HAVE_EVP_MD_CTX_FREE */
#if !HAVE_EVP_MD_CTX_RESET
int
EVP_MD_CTX_reset(EVP_MD_CTX *ctx) {