aboutsummaryrefslogtreecommitdiffstats
path: root/apps/speed.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-06-18 06:22:33 +0000
committerRichard Levitte <levitte@openssl.org>2001-06-18 06:22:33 +0000
commit531d630b5cfe0c50de122f0387a65473b4746bf8 (patch)
treef74f6b2b970014bb6496b9e3fa10a6f701eb936c /apps/speed.c
parent853b1eb424bf60a8ddebdd01baa5af0cc6e204d4 (diff)
downloadopenssl-531d630b5cfe0c50de122f0387a65473b4746bf8.tar.gz
Provide an application-common setup function for engines and use it
everywhere.
Diffstat (limited to 'apps/speed.c')
-rw-r--r--apps/speed.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 27e6c43292..dd3270f6eb 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -505,21 +505,8 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err,"no engine given\n");
goto end;
}
- if((e = ENGINE_by_id(*argv)) == NULL)
- {
- BIO_printf(bio_err,"invalid engine \"%s\"\n",
- *argv);
- goto end;
- }
- if(!ENGINE_set_default(e, ENGINE_METHOD_ALL))
- {
- BIO_printf(bio_err,"can't use that engine\n");
- goto end;
- }
- BIO_printf(bio_err,"engine \"%s\" set.\n", *argv);
- /* Free our "structural" reference. */
- ENGINE_free(e);
- /* It will be increased again further down. We just
+ e = setup_engine(bio_err, *argv, 0);
+ /* j will be increased again further down. We just
don't want speed to confuse an engine with an
algorithm, especially when none is given (which
means all of them should be run) */