apps: instead of varying implementation, make setup_engine a function always
authorRichard Levitte <levitte@openssl.org>
Wed, 19 Oct 2016 17:49:22 +0000 (19:49 +0200)
committerRichard Levitte <richard@levitte.org>
Thu, 20 Oct 2016 06:59:53 +0000 (08:59 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1643)
(cherry picked from commit 907c6c86331243897b80f37895a14de1e7957541)

apps/apps.c
apps/apps.h

index 4258b311d860313df6e488802a8ec4b2bc5ab691..cc557e565fe06f611ae80efba556cd410d2a54f7 100644 (file)
@@ -1243,11 +1243,13 @@ static ENGINE *try_load_engine(const char *engine)
     }
     return e;
 }
+#endif
 
 ENGINE *setup_engine(const char *engine, int debug)
 {
     ENGINE *e = NULL;
 
+#ifndef OPENSSL_NO_ENGINE
     if (engine) {
         if (strcmp(engine, "auto") == 0) {
             BIO_printf(bio_err, "enabling auto ENGINE support\n");
@@ -1273,9 +1275,9 @@ ENGINE *setup_engine(const char *engine, int debug)
 
         BIO_printf(bio_err, "engine \"%s\" set.\n", ENGINE_get_id(e));
     }
+#endif
     return e;
 }
-#endif
 
 void release_engine(ENGINE *e)
 {
index 8ff84674b6d0615b0020e99af84d1b970a1cf221..926a6d6205d77330599fadacbf6ea96140b30af2 100644 (file)
@@ -430,12 +430,9 @@ __owur int ctx_set_ctlog_list_file(SSL_CTX *ctx, const char *path);
 
 #endif
 
-# ifdef OPENSSL_NO_ENGINE
-#  define setup_engine(engine, debug) NULL
-# else
 ENGINE *setup_engine(const char *engine, int debug);
-# endif
 void release_engine(ENGINE *e);
+
 # ifndef OPENSSL_NO_OCSP
 OCSP_RESPONSE *process_responder(OCSP_REQUEST *req,
                                  const char *host, const char *path,