summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-09-03 18:11:49 +0200
committerRichard Levitte <levitte@openssl.org>2019-09-04 10:38:13 +0200
commit550f974a09942ace37cf3cf14021ea5e51e6dd11 (patch)
tree6a5fc648e9b04b21f844e4998540c4b8c286394e /providers
parent3fd7026276475d72a3b5bbbe42cd1f5ff6b0e736 (diff)
New function EVP_CIPHER_free()
This function re-implements EVP_CIPHER_meth_free(), but has a name that isn't encumbered by legacy EVP_CIPHER construction functionality. We also refactor most of EVP_CIPHER_meth_new() into an internal evp_cipher_new() that's used when creating fetched methods. EVP_CIPHER_meth_new() and EVP_CIPHER_meth_free() are rewritten in terms of evp_cipher_new() and EVP_CIPHER_free(). This means that at any time, we can deprecate all the EVP_CIPHER_meth_ functions with no harmful consequence. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9758)
Diffstat (limited to 'providers')
-rw-r--r--providers/common/macs/cmac_prov.c4
-rw-r--r--providers/common/macs/gmac_prov.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/providers/common/macs/cmac_prov.c b/providers/common/macs/cmac_prov.c
index 4dcdea6ebe..7c15bc77b0 100644
--- a/providers/common/macs/cmac_prov.c
+++ b/providers/common/macs/cmac_prov.c
@@ -76,7 +76,7 @@ static void cmac_free(void *vmacctx)
if (macctx != NULL) {
CMAC_CTX_free(macctx->ctx);
- EVP_CIPHER_meth_free(macctx->alloc_cipher);
+ EVP_CIPHER_free(macctx->alloc_cipher);
OPENSSL_free(macctx);
}
}
@@ -208,7 +208,7 @@ static int cmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[])
propquery = p->data;
}
- EVP_CIPHER_meth_free(macctx->alloc_cipher);
+ EVP_CIPHER_free(macctx->alloc_cipher);
macctx->tmpcipher = macctx->alloc_cipher =
EVP_CIPHER_fetch(PROV_LIBRARY_CONTEXT_OF(macctx->provctx),
diff --git a/providers/common/macs/gmac_prov.c b/providers/common/macs/gmac_prov.c
index abd5baa106..22c8c95550 100644
--- a/providers/common/macs/gmac_prov.c
+++ b/providers/common/macs/gmac_prov.c
@@ -64,7 +64,7 @@ static void gmac_free(void *vmacctx)
if (macctx != NULL) {
EVP_CIPHER_CTX_free(macctx->ctx);
- EVP_CIPHER_meth_free(macctx->alloc_cipher);
+ EVP_CIPHER_free(macctx->alloc_cipher);
OPENSSL_free(macctx);
}
}
@@ -222,7 +222,7 @@ static int gmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[])
propquery = p->data;
}
- EVP_CIPHER_meth_free(macctx->alloc_cipher);
+ EVP_CIPHER_free(macctx->alloc_cipher);
macctx->cipher = macctx->alloc_cipher = NULL;
macctx->cipher = macctx->alloc_cipher =