]> granicus.if.org Git - openssl/commitdiff
Fix error message when loading engines from config
authorDmitry Belyavsky <beldmit@gmail.com>
Fri, 16 Oct 2015 09:07:57 +0000 (10:07 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 16 Oct 2015 09:11:46 +0000 (10:11 +0100)
When using command line applications errors occur when trying to
load engines specified in a config file. Introduced by commit
a0a82324f96

RT#4093

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
apps/openssl.c

index 565903f9f70af822917bf93c61eb443432cc3ade..2b0425bf0a8cba27722aba881969a5c8161abe1e 100644 (file)
@@ -175,6 +175,10 @@ static int apps_startup()
     ERR_load_crypto_strings();
     ERR_load_SSL_strings();
 
+    OPENSSL_load_builtin_modules();
+#ifndef OPENSSL_NO_ENGINE
+    ENGINE_load_builtin_engines();
+#endif
     if (!app_load_modules(NULL)) {
         ERR_print_errors(bio_err);
         BIO_printf(bio_err, "Error loading default configuration\n");
@@ -183,12 +187,8 @@ static int apps_startup()
 
     OpenSSL_add_all_algorithms();
     OpenSSL_add_ssl_algorithms();
-    OPENSSL_load_builtin_modules();
     setup_ui_method();
     /*SSL_library_init();*/
-#ifndef OPENSSL_NO_ENGINE
-    ENGINE_load_builtin_engines();
-#endif
     return 1;
 }