summaryrefslogtreecommitdiffstats
path: root/apps/cms.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-24 16:31:57 +0200
committerRichard Levitte <levitte@openssl.org>2020-10-26 09:43:39 +0100
commit22dddfb925da8775eaf4ee8c377da41e6535afe1 (patch)
tree86eae67fce686dd241e2540b7b03b42b247f7918 /apps/cms.c
parentb6120b5f5442c3ddd081a9378ec89b888c3bb0fe (diff)
APPS: Remove the format argument where it's not used
Also, restore a behaviour change, where load_cert() would look at stdin when the input file name is NULL, and make sure to call load_cert_pass() with a corresponding argument where load_cert() was used in OpenSSL 1.1.1. Fixes #13235 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13236)
Diffstat (limited to 'apps/cms.c')
-rw-r--r--apps/cms.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/apps/cms.c b/apps/cms.c
index 4589a24f06..f9adc9a52c 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -616,8 +616,7 @@ int cms_main(int argc, char **argv)
if (operation == SMIME_ENCRYPT) {
if (encerts == NULL && (encerts = sk_X509_new_null()) == NULL)
goto end;
- cert = load_cert(opt_arg(), FORMAT_UNDEF,
- "recipient certificate file");
+ cert = load_cert(opt_arg(), "recipient certificate file");
if (cert == NULL)
goto end;
sk_X509_push(encerts, cert);
@@ -809,8 +808,7 @@ int cms_main(int argc, char **argv)
if ((encerts = sk_X509_new_null()) == NULL)
goto end;
while (*argv) {
- if ((cert = load_cert(*argv, FORMAT_UNDEF,
- "recipient certificate file")) == NULL)
+ if ((cert = load_cert(*argv, "recipient certificate file")) == NULL)
goto end;
sk_X509_push(encerts, cert);
cert = NULL;
@@ -826,7 +824,7 @@ int cms_main(int argc, char **argv)
}
if (recipfile != NULL && (operation == SMIME_DECRYPT)) {
- if ((recip = load_cert(recipfile, FORMAT_UNDEF,
+ if ((recip = load_cert(recipfile,
"recipient certificate file")) == NULL) {
ERR_print_errors(bio_err);
goto end;
@@ -834,7 +832,7 @@ int cms_main(int argc, char **argv)
}
if (originatorfile != NULL) {
- if ((originator = load_cert(originatorfile, FORMAT_UNDEF,
+ if ((originator = load_cert(originatorfile,
"originator certificate file")) == NULL) {
ERR_print_errors(bio_err);
goto end;
@@ -842,7 +840,7 @@ int cms_main(int argc, char **argv)
}
if (operation == SMIME_SIGN_RECEIPT) {
- if ((signer = load_cert(signerfile, FORMAT_UNDEF,
+ if ((signer = load_cert(signerfile,
"receipt signer certificate file")) == NULL) {
ERR_print_errors(bio_err);
goto end;
@@ -1049,8 +1047,7 @@ int cms_main(int argc, char **argv)
signerfile = sk_OPENSSL_STRING_value(sksigners, i);
keyfile = sk_OPENSSL_STRING_value(skkeys, i);
- signer = load_cert(signerfile, FORMAT_UNDEF,
- "signer certificate");
+ signer = load_cert(signerfile, "signer certificate");
if (signer == NULL) {
ret = 2;
goto end;