OpenSSL: Load legacy provider when needed for OpenSSL 3.0

Number of the older algorithms have now been moved into a separate
provider in OpenSSL 3.0 and they are not available by default.
Explicitly load the legacy provider when such an algorithm is needed for
the first time.

In addition, at least for now, load the legacy providers when initiating
TLS context to maintain existing functionality for various private key
formats.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-01-11 12:43:19 +02:00 committed by Jouni Malinen
parent ddcdd62866
commit ff2eccbdf9
2 changed files with 32 additions and 0 deletions

View file

@ -957,6 +957,10 @@ void * tls_init(const struct tls_config *conf)
const char *ciphers;
if (tls_openssl_ref_count == 0) {
void openssl_load_legacy_provider(void);
openssl_load_legacy_provider();
tls_global = context = tls_context_new(conf);
if (context == NULL)
return NULL;