summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-06-09 07:52:09 +0200
committerRichard Levitte <levitte@openssl.org>2021-06-15 16:21:32 +0200
commitcd770738796c591f93b2db630bab57cd8d3d5796 (patch)
treeeb686e73390a47e16dfa426b2e656650f809ae46 /crypto
parentRefactor evp_generic_do_all() to behave like evp_generic_fetch() (diff)
downloadopenssl-cd770738796c591f93b2db630bab57cd8d3d5796.tar.xz
openssl-cd770738796c591f93b2db630bab57cd8d3d5796.zip
Adapt all public EVP_XXX_do_all_provided() for the changed evp_generic_do_all()
Fixes #15538 Fixes #14837 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15604)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/asymcipher.c1
-rw-r--r--crypto/evp/digest.c2
-rw-r--r--crypto/evp/evp_enc.c3
-rw-r--r--crypto/evp/evp_rand.c3
-rw-r--r--crypto/evp/exchange.c1
-rw-r--r--crypto/evp/kdf_meth.c2
-rw-r--r--crypto/evp/kem.c1
-rw-r--r--crypto/evp/keymgmt_meth.c1
-rw-r--r--crypto/evp/mac_meth.c2
-rw-r--r--crypto/evp/signature.c1
10 files changed, 12 insertions, 5 deletions
diff --git a/crypto/evp/asymcipher.c b/crypto/evp/asymcipher.c
index 1368f7094e..3150bfa94b 100644
--- a/crypto/evp/asymcipher.c
+++ b/crypto/evp/asymcipher.c
@@ -451,6 +451,7 @@ void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
evp_generic_do_all(libctx, OSSL_OP_ASYM_CIPHER,
(void (*)(void *, void *))fn, arg,
evp_asym_cipher_from_algorithm,
+ (int (*)(void *))EVP_ASYM_CIPHER_up_ref,
(void (*)(void *))EVP_ASYM_CIPHER_free);
}
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index 00806ae201..98c39343be 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -1069,5 +1069,5 @@ void EVP_MD_do_all_provided(OSSL_LIB_CTX *libctx,
{
evp_generic_do_all(libctx, OSSL_OP_DIGEST,
(void (*)(void *, void *))fn, arg,
- evp_md_from_algorithm, evp_md_free);
+ evp_md_from_algorithm, evp_md_up_ref, evp_md_free);
}
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index 5188e73602..3a8e2c643e 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -1649,5 +1649,6 @@ void EVP_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
{
evp_generic_do_all(libctx, OSSL_OP_CIPHER,
(void (*)(void *, void *))fn, arg,
- evp_cipher_from_algorithm, evp_cipher_free);
+ evp_cipher_from_algorithm, evp_cipher_up_ref,
+ evp_cipher_free);
}
diff --git a/crypto/evp/evp_rand.c b/crypto/evp/evp_rand.c
index a76d746d9a..7b1a44241e 100644
--- a/crypto/evp/evp_rand.c
+++ b/crypto/evp/evp_rand.c
@@ -489,7 +489,8 @@ void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
{
evp_generic_do_all(libctx, OSSL_OP_RAND,
(void (*)(void *, void *))fn, arg,
- evp_rand_from_algorithm, evp_rand_free);
+ evp_rand_from_algorithm, evp_rand_up_ref,
+ evp_rand_free);
}
int EVP_RAND_names_do_all(const EVP_RAND *rand,
diff --git a/crypto/evp/exchange.c b/crypto/evp/exchange.c
index 72472aaace..ca8a049a1b 100644
--- a/crypto/evp/exchange.c
+++ b/crypto/evp/exchange.c
@@ -485,6 +485,7 @@ void EVP_KEYEXCH_do_all_provided(OSSL_LIB_CTX *libctx,
evp_generic_do_all(libctx, OSSL_OP_KEYEXCH,
(void (*)(void *, void *))fn, arg,
evp_keyexch_from_algorithm,
+ (int (*)(void *))EVP_KEYEXCH_up_ref,
(void (*)(void *))EVP_KEYEXCH_free);
}
diff --git a/crypto/evp/kdf_meth.c b/crypto/evp/kdf_meth.c
index 8759021afc..94af5d40a0 100644
--- a/crypto/evp/kdf_meth.c
+++ b/crypto/evp/kdf_meth.c
@@ -228,5 +228,5 @@ void EVP_KDF_do_all_provided(OSSL_LIB_CTX *libctx,
{
evp_generic_do_all(libctx, OSSL_OP_KDF,
(void (*)(void *, void *))fn, arg,
- evp_kdf_from_algorithm, evp_kdf_free);
+ evp_kdf_from_algorithm, evp_kdf_up_ref, evp_kdf_free);
}
diff --git a/crypto/evp/kem.c b/crypto/evp/kem.c
index 721b840ea5..cb904a6b26 100644
--- a/crypto/evp/kem.c
+++ b/crypto/evp/kem.c
@@ -364,6 +364,7 @@ void EVP_KEM_do_all_provided(OSSL_LIB_CTX *libctx,
{
evp_generic_do_all(libctx, OSSL_OP_KEM, (void (*)(void *, void *))fn, arg,
evp_kem_from_algorithm,
+ (int (*)(void *))EVP_KEM_up_ref,
(void (*)(void *))EVP_KEM_free);
}
diff --git a/crypto/evp/keymgmt_meth.c b/crypto/evp/keymgmt_meth.c
index 439b8f035c..ca357b60ef 100644
--- a/crypto/evp/keymgmt_meth.c
+++ b/crypto/evp/keymgmt_meth.c
@@ -278,6 +278,7 @@ void EVP_KEYMGMT_do_all_provided(OSSL_LIB_CTX *libctx,
evp_generic_do_all(libctx, OSSL_OP_KEYMGMT,
(void (*)(void *, void *))fn, arg,
keymgmt_from_algorithm,
+ (int (*)(void *))EVP_KEYMGMT_up_ref,
(void (*)(void *))EVP_KEYMGMT_free);
}
diff --git a/crypto/evp/mac_meth.c b/crypto/evp/mac_meth.c
index 74cfecbcdf..99b1e3b003 100644
--- a/crypto/evp/mac_meth.c
+++ b/crypto/evp/mac_meth.c
@@ -233,5 +233,5 @@ void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx,
{
evp_generic_do_all(libctx, OSSL_OP_MAC,
(void (*)(void *, void *))fn, arg,
- evp_mac_from_algorithm, evp_mac_free);
+ evp_mac_from_algorithm, evp_mac_up_ref, evp_mac_free);
}
diff --git a/crypto/evp/signature.c b/crypto/evp/signature.c
index b31f6a4bd0..e3bfdd56a2 100644
--- a/crypto/evp/signature.c
+++ b/crypto/evp/signature.c
@@ -342,6 +342,7 @@ void EVP_SIGNATURE_do_all_provided(OSSL_LIB_CTX *libctx,
evp_generic_do_all(libctx, OSSL_OP_SIGNATURE,
(void (*)(void *, void *))fn, arg,
evp_signature_from_algorithm,
+ (int (*)(void *))EVP_SIGNATURE_up_ref,
(void (*)(void *))EVP_SIGNATURE_free);
}