diff options
author | Richard Levitte <levitte@openssl.org> | 2001-06-18 06:22:33 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-06-18 06:22:33 +0000 |
commit | 531d630b5cfe0c50de122f0387a65473b4746bf8 (patch) | |
tree | f74f6b2b970014bb6496b9e3fa10a6f701eb936c /apps/s_client.c | |
parent | 853b1eb424bf60a8ddebdd01baa5af0cc6e204d4 (diff) |
Provide an application-common setup function for engines and use it
everywhere.
Diffstat (limited to 'apps/s_client.c')
-rw-r--r-- | apps/s_client.c | 23 |
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) |