apps: instead of varying implementation, make setup_engine a function always

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1643)
This commit is contained in:
Richard Levitte 2016-10-19 19:49:22 +02:00
parent dd1abd4462
commit 907c6c8633
2 changed files with 4 additions and 5 deletions

View file

@ -1251,11 +1251,13 @@ static ENGINE *try_load_engine(const char *engine)
} }
return e; return e;
} }
#endif
ENGINE *setup_engine(const char *engine, int debug) ENGINE *setup_engine(const char *engine, int debug)
{ {
ENGINE *e = NULL; ENGINE *e = NULL;
#ifndef OPENSSL_NO_ENGINE
if (engine) { if (engine) {
if (strcmp(engine, "auto") == 0) { if (strcmp(engine, "auto") == 0) {
BIO_printf(bio_err, "enabling auto ENGINE support\n"); BIO_printf(bio_err, "enabling auto ENGINE support\n");
@ -1281,9 +1283,9 @@ ENGINE *setup_engine(const char *engine, int debug)
BIO_printf(bio_err, "engine \"%s\" set.\n", ENGINE_get_id(e)); BIO_printf(bio_err, "engine \"%s\" set.\n", ENGINE_get_id(e));
} }
#endif
return e; return e;
} }
#endif
void release_engine(ENGINE *e) void release_engine(ENGINE *e)
{ {

View file

@ -430,12 +430,9 @@ __owur int ctx_set_ctlog_list_file(SSL_CTX *ctx, const char *path);
#endif #endif
# ifdef OPENSSL_NO_ENGINE
# define setup_engine(engine, debug) NULL
# else
ENGINE *setup_engine(const char *engine, int debug); ENGINE *setup_engine(const char *engine, int debug);
# endif
void release_engine(ENGINE *e); void release_engine(ENGINE *e);
# ifndef OPENSSL_NO_OCSP # ifndef OPENSSL_NO_OCSP
OCSP_RESPONSE *process_responder(OCSP_REQUEST *req, OCSP_RESPONSE *process_responder(OCSP_REQUEST *req,
const char *host, const char *path, const char *host, const char *path,