Add functions to see if a provider is available for use.
authorRichard Levitte <levitte@openssl.org>
Wed, 17 Jul 2019 09:29:04 +0000 (11:29 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 26 Jul 2019 16:14:41 +0000 (18:14 +0200)
commit36f5ec55e69716024f70df53074a2871e091a3e1
treef8b0a1f6b8a846e6124ac91f50149f2f805395c4
parent166c0b98fd6e8b1bb341397642527a9396468f6c
Add functions to see if a provider is available for use.

Public function OSSL_PROVIDER_available() takes a library context and
a provider name, and returns 1 if it's available for use, i.e. if it's
possible to fetch implementations from it, otherwise 0.

Internal function ossl_provider_activated() returns 1 if the given
OSSL_PROVIDER is activated, otherwise 0.

To make this possible, the activation of fallbacks got refactored out
to a separate function, which ended up simplifying the code.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9398)
CHANGES
crypto/provider.c
crypto/provider_core.c
doc/internal/man3/ossl_provider_new.pod
doc/man3/OSSL_PROVIDER.pod
include/internal/provider.h
include/internal/symhacks.h
include/openssl/provider.h
util/libcrypto.num