summaryrefslogtreecommitdiffstats
path: root/apps/s_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/s_client.c')
-rw-r--r--apps/s_client.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index bad59f6468..009aa83e4e 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -382,28 +382,7 @@ bad:
OpenSSL_add_ssl_algorithms();
SSL_load_error_strings();
- if (engine_id != NULL)
- {
- if((e = ENGINE_by_id(engine_id)) == NULL)
- {
- BIO_printf(bio_err,"invalid engine\n");
- ERR_print_errors(bio_err);
- goto end;
- }
- if (c_debug)
- {
- ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM,
- 0, bio_err, 0);
- }
- if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
- {
- BIO_printf(bio_err,"can't use that engine\n");
- ERR_print_errors(bio_err);
- goto end;
- }
- BIO_printf(bio_err,"engine \"%s\" set.\n", engine_id);
- ENGINE_free(e);
- }
+ e = setup_engine(bio_err, engine_id, 1);
ctx=SSL_CTX_new(meth);
if (ctx == NULL)