summaryrefslogtreecommitdiff
path: root/crypto/provider_core.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2022-04-20 16:43:13 +0200
committerRichard Levitte <levitte@openssl.org>2022-05-05 15:05:54 +0200
commit20b6d85ab2b9cfa4cd29d2422d69c3e3f4db0a41 (patch)
treeb36e80fcc6b3c399828112365c01f4c4f4b61706 /crypto/provider_core.c
parent802cacf34f2db9111becb4f0d3aa00460df13a19 (diff)
downloadopenssl-new-20b6d85ab2b9cfa4cd29d2422d69c3e3f4db0a41.tar.gz
Drop ossl_provider_clear_all_operation_bits() and all uses of it
This is a misused function, as it was called during query cache flush, when the provider operation bits were meant to record if methods for a certain operation has already been added to the method store. Fixes #18150 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18151)
Diffstat (limited to 'crypto/provider_core.c')
-rw-r--r--crypto/provider_core.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c
index 3767570032..c24cb65f51 100644
--- a/crypto/provider_core.c
+++ b/crypto/provider_core.c
@@ -1520,33 +1520,6 @@ void ossl_provider_unquery_operation(const OSSL_PROVIDER *prov,
prov->unquery_operation(prov->provctx, operation_id, algs);
}
-int ossl_provider_clear_all_operation_bits(OSSL_LIB_CTX *libctx)
-{
- struct provider_store_st *store;
- OSSL_PROVIDER *provider;
- int i, num, res = 1;
-
- if ((store = get_provider_store(libctx)) != NULL) {
- if (!CRYPTO_THREAD_read_lock(store->lock))
- return 0;
- num = sk_OSSL_PROVIDER_num(store->providers);
- for (i = 0; i < num; i++) {
- provider = sk_OSSL_PROVIDER_value(store->providers, i);
- if (!CRYPTO_THREAD_write_lock(provider->opbits_lock)) {
- res = 0;
- continue;
- }
- if (provider->operation_bits != NULL)
- memset(provider->operation_bits, 0,
- provider->operation_bits_sz);
- CRYPTO_THREAD_unlock(provider->opbits_lock);
- }
- CRYPTO_THREAD_unlock(store->lock);
- return res;
- }
- return 0;
-}
-
int ossl_provider_set_operation_bit(OSSL_PROVIDER *provider, size_t bitnum)
{
size_t byte = bitnum / 8;