summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/cms.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/usr.bin/openssl/cms.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/usr.bin/openssl/cms.c b/src/usr.bin/openssl/cms.c
index c6e662ab33..fccac23db7 100644
--- a/src/usr.bin/openssl/cms.c
+++ b/src/usr.bin/openssl/cms.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms.c,v 1.2 2015/08/22 16:36:05 jsing Exp $ */ 1/* $OpenBSD: cms.c,v 1.3 2015/09/11 14:30:23 bcook Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -99,7 +99,6 @@ int verify_err = 0;
99int 99int
100cms_main(int argc, char **argv) 100cms_main(int argc, char **argv)
101{ 101{
102 ENGINE *e = NULL;
103 int operation = 0; 102 int operation = 0;
104 int ret = 0; 103 int ret = 0;
105 char **args; 104 char **args;
@@ -128,9 +127,6 @@ cms_main(int argc, char **argv)
128 const EVP_MD *sign_md = NULL; 127 const EVP_MD *sign_md = NULL;
129 int informat = FORMAT_SMIME, outformat = FORMAT_SMIME; 128 int informat = FORMAT_SMIME, outformat = FORMAT_SMIME;
130 int rctformat = FORMAT_SMIME, keyform = FORMAT_PEM; 129 int rctformat = FORMAT_SMIME, keyform = FORMAT_PEM;
131#ifndef OPENSSL_NO_ENGINE
132 char *engine = NULL;
133#endif
134 unsigned char *secret_key = NULL, *secret_keyid = NULL; 130 unsigned char *secret_key = NULL, *secret_keyid = NULL;
135 unsigned char *pwri_pass = NULL, *pwri_tmp = NULL; 131 unsigned char *pwri_pass = NULL, *pwri_tmp = NULL;
136 size_t secret_keylen = 0, secret_keyidlen = 0; 132 size_t secret_keylen = 0, secret_keyidlen = 0;
@@ -310,13 +306,6 @@ cms_main(int argc, char **argv)
310 goto argerr; 306 goto argerr;
311 } 307 }
312 } 308 }
313#ifndef OPENSSL_NO_ENGINE
314 else if (!strcmp(*args, "-engine")) {
315 if (!args[1])
316 goto argerr;
317 engine = *++args;
318 }
319#endif
320 else if (!strcmp(*args, "-passin")) { 309 else if (!strcmp(*args, "-passin")) {
321 if (!args[1]) 310 if (!args[1])
322 goto argerr; 311 goto argerr;
@@ -526,7 +515,7 @@ argerr:
526 BIO_printf(bio_err, "-in file input file\n"); 515 BIO_printf(bio_err, "-in file input file\n");
527 BIO_printf(bio_err, "-inform arg input format SMIME (default), PEM or DER\n"); 516 BIO_printf(bio_err, "-inform arg input format SMIME (default), PEM or DER\n");
528 BIO_printf(bio_err, "-inkey file input private key (if not signer or recipient)\n"); 517 BIO_printf(bio_err, "-inkey file input private key (if not signer or recipient)\n");
529 BIO_printf(bio_err, "-keyform arg input private key format (PEM or ENGINE)\n"); 518 BIO_printf(bio_err, "-keyform arg input private key format (PEM)\n");
530 BIO_printf(bio_err, "-out file output file\n"); 519 BIO_printf(bio_err, "-out file output file\n");
531 BIO_printf(bio_err, "-outform arg output format SMIME (default), PEM or DER\n"); 520 BIO_printf(bio_err, "-outform arg output format SMIME (default), PEM or DER\n");
532 BIO_printf(bio_err, "-content file supply or override content for detached signature\n"); 521 BIO_printf(bio_err, "-content file supply or override content for detached signature\n");
@@ -538,16 +527,10 @@ argerr:
538 BIO_printf(bio_err, "-CAfile file trusted certificates file\n"); 527 BIO_printf(bio_err, "-CAfile file trusted certificates file\n");
539 BIO_printf(bio_err, "-crl_check check revocation status of signer's certificate using CRLs\n"); 528 BIO_printf(bio_err, "-crl_check check revocation status of signer's certificate using CRLs\n");
540 BIO_printf(bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n"); 529 BIO_printf(bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n");
541#ifndef OPENSSL_NO_ENGINE
542 BIO_printf(bio_err, "-engine e use engine e, possibly a hardware device.\n");
543#endif
544 BIO_printf(bio_err, "-passin arg input file pass phrase source\n"); 530 BIO_printf(bio_err, "-passin arg input file pass phrase source\n");
545 BIO_printf(bio_err, "cert.pem recipient certificate(s) for encryption\n"); 531 BIO_printf(bio_err, "cert.pem recipient certificate(s) for encryption\n");
546 goto end; 532 goto end;
547 } 533 }
548#ifndef OPENSSL_NO_ENGINE
549 e = setup_engine(bio_err, engine, 0);
550#endif
551 534
552 if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) { 535 if (!app_passwd(bio_err, passargin, NULL, &passin, NULL)) {
553 BIO_printf(bio_err, "Error getting password\n"); 536 BIO_printf(bio_err, "Error getting password\n");