summaryrefslogtreecommitdiffstats
path: root/apps/smime.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-01-30 17:39:26 +0000
committerRichard Levitte <levitte@openssl.org>2003-01-30 17:39:26 +0000
commit0b13e9f055d3f7be066dc2e89fc9f9822b12eca7 (patch)
tree633b5d3e4c9356eaf9816541aaa079a0c3be9194 /apps/smime.c
parent96f7065f6392e19f1449578aaeabb8dc39294fa7 (diff)
Add the possibility to build without the ENGINE framework.
PR: 287
Diffstat (limited to 'apps/smime.c')
-rw-r--r--apps/smime.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/smime.c b/apps/smime.c
index ef0e477464..cc248d377b 100644
--- a/apps/smime.c
+++ b/apps/smime.c
@@ -104,7 +104,9 @@ int MAIN(int argc, char **argv)
int need_rand = 0;
int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
int keyform = FORMAT_PEM;
+#ifndef OPENSSL_NO_ENGINE
char *engine=NULL;
+#endif
args = argv + 1;
ret = 1;
@@ -176,11 +178,13 @@ int MAIN(int argc, char **argv)
inrand = *args;
} else badarg = 1;
need_rand = 1;
+#ifndef OPENSSL_NO_ENGINE
} else if (!strcmp(*args,"-engine")) {
if (args[1]) {
args++;
engine = *args;
} else badarg = 1;
+#endif
} else if (!strcmp(*args,"-passin")) {
if (args[1]) {
args++;
@@ -330,7 +334,9 @@ int MAIN(int argc, char **argv)
BIO_printf (bio_err, "-CAfile file trusted certificates file\n");
BIO_printf (bio_err, "-crl_check check revocation status of signer's certificate using CRLs\n");
BIO_printf (bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n");
+#ifndef OPENSSL_NO_ENGINE
BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n");
+#endif
BIO_printf (bio_err, "-passin arg input file pass phrase source\n");
BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
BIO_printf(bio_err, " load the file (or the files in the directory) into\n");
@@ -339,7 +345,9 @@ int MAIN(int argc, char **argv)
goto end;
}
+#ifndef OPENSSL_NO_ENGINE
e = setup_engine(bio_err, engine, 0);
+#endif
if(!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
BIO_printf(bio_err, "Error getting password\n");