summaryrefslogtreecommitdiffstats
path: root/crypto/provider.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-05-18 12:43:12 +0200
committerRichard Levitte <levitte@openssl.org>2020-05-20 11:26:14 +0200
commita7ad40c502d3484e0a574e121cfba70631f224bf (patch)
tree68997906916c0eb3768f0723e6f310b77c8ee6c1 /crypto/provider.c
parentUpdate early data exchange scenarios in doc (diff)
downloadopenssl-a7ad40c502d3484e0a574e121cfba70631f224bf.tar.xz
openssl-a7ad40c502d3484e0a574e121cfba70631f224bf.zip
Add OSSL_PROVIDER_do_all()
This allows applications to iterate over all loaded providers. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11858)
Diffstat (limited to 'crypto/provider.c')
-rw-r--r--crypto/provider.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/provider.c b/crypto/provider.c
index fe46d31877..09a5e53907 100644
--- a/crypto/provider.c
+++ b/crypto/provider.c
@@ -85,3 +85,11 @@ const char *OSSL_PROVIDER_name(const OSSL_PROVIDER *prov)
{
return ossl_provider_name(prov);
}
+
+int OSSL_PROVIDER_do_all(OPENSSL_CTX *ctx,
+ int (*cb)(OSSL_PROVIDER *provider,
+ void *cbdata),
+ void *cbdata)
+{
+ return ossl_provider_forall_loaded(ctx, cb, cbdata);
+}