]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps: call ERR_print_errors when OSSL_PROVIDER_load fails
authorPetr Gotthard <petr.gotthard@centrum.cz>
Sat, 10 Apr 2021 09:08:58 +0000 (11:08 +0200)
committerPauli <pauli@openssl.org>
Tue, 13 Apr 2021 08:07:18 +0000 (18:07 +1000)
The ERR_print_errors often displays the reason why the provider
couldn't be loaded. Hence it is quite important for debugging.

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14818)

apps/lib/app_provider.c

index 5683866377c97f3c6d285853924a0d3caa24b36c..fd7d55c09ba60eaae2e68709bda446fe59acefcc 100644 (file)
@@ -35,6 +35,7 @@ int app_provider_load(OSSL_LIB_CTX *libctx, const char *provider_name)
     if (prov == NULL) {
         opt_printf_stderr("%s: unable to load provider %s\n",
                           opt_getprog(), provider_name);
+        ERR_print_errors(bio_err);
         return 0;
     }
     if (app_providers == NULL)