summaryrefslogtreecommitdiffstats
path: root/apps/pkcs7.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/pkcs7.c
parent853b1eb424bf60a8ddebdd01baa5af0cc6e204d4 (diff)
Provide an application-common setup function for engines and use it
everywhere.
Diffstat (limited to 'apps/pkcs7.c')
-rw-r--r--apps/pkcs7.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/pkcs7.c b/apps/pkcs7.c
index 63ec8a5744..f3df25fe8b 100644
--- a/apps/pkcs7.c
+++ b/apps/pkcs7.c
@@ -168,23 +168,7 @@ bad:
ERR_load_crypto_strings();
- 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);
in=BIO_new(BIO_s_file());
out=BIO_new(BIO_s_file());