From 531d630b5cfe0c50de122f0387a65473b4746bf8 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 18 Jun 2001 06:22:33 +0000 Subject: Provide an application-common setup function for engines and use it everywhere. --- apps/rsautl.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'apps/rsautl.c') diff --git a/apps/rsautl.c b/apps/rsautl.c index 86aa95d38a..56025c5f0c 100644 --- a/apps/rsautl.c +++ b/apps/rsautl.c @@ -157,23 +157,7 @@ int MAIN(int argc, char **argv) goto end; } - if (engine != NULL) - { - if((e = ENGINE_by_id(engine)) == NULL) - { - BIO_printf(bio_err,"invalid engine \"%s\"\n", - engine); - 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", engine); - /* Free our "structural" reference. */ - ENGINE_free(e); - } + e = setup_engine(bio_err, engine, 0); /* FIXME: seed PRNG only if needed */ app_RAND_load_file(NULL, bio_err, 0); -- cgit v1.2.3