From: Matt Caswell Date: Thu, 22 Apr 2021 07:31:08 +0000 (+0100) Subject: Modify the legacy provider to use OSSL_LIB_CTX_new_child() X-Git-Tag: openssl-3.0.0-alpha17~191 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0efad482f7d72db3d52bdb0380bd019e6d59de8;p=thirdparty%2Fopenssl.git Modify the legacy provider to use OSSL_LIB_CTX_new_child() Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14991) --- diff --git a/providers/legacyprov.c b/providers/legacyprov.c index 852f6a4e913..1f137a721fa 100644 --- a/providers/legacyprov.c +++ b/providers/legacyprov.c @@ -178,13 +178,8 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle, { OSSL_LIB_CTX *libctx = NULL; - /* - * We do not need to use any up-calls provided by libcrypto, so we ignore - * the "in" dispatch table. - */ - if ((*provctx = ossl_prov_ctx_new()) == NULL - || (libctx = OSSL_LIB_CTX_new()) == NULL) { + || (libctx = OSSL_LIB_CTX_new_child(handle, in)) == NULL) { OSSL_LIB_CTX_free(libctx); legacy_teardown(*provctx); *provctx = NULL;