apps: use get_cipher_any() instead of get_cipher() for commands that support these...
authorPauli <pauli@openssl.org>
Tue, 15 Jun 2021 04:07:25 +0000 (14:07 +1000)
committerPauli <pauli@openssl.org>
Wed, 16 Jun 2021 08:32:30 +0000 (18:32 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15747)

apps/cms.c
apps/pkcs12.c
apps/smime.c

index 81112c5a38ccad9e7ea18e8908a582953deffb6e..58ce54e4543cfbbbcf928b9db3abf8ebed5376c0 100644 (file)
@@ -725,11 +725,11 @@ int cms_main(int argc, char **argv)
             goto end;
     }
     if (ciphername != NULL) {
-        if (!opt_cipher(ciphername, &cipher))
+        if (!opt_cipher_any(ciphername, &cipher))
             goto end;
     }
     if (wrapname != NULL) {
-        if (!opt_cipher(wrapname, &wrap_cipher))
+        if (!opt_cipher_any(wrapname, &wrap_cipher))
             goto end;
     }
 
index 5df5cb78ced33cad75d6f36f26f1202bca86fee0..1234a698922a2da1e53a90f434020847cd5dd0f1 100644 (file)
@@ -364,7 +364,7 @@ int pkcs12_main(int argc, char **argv)
         goto end;
 
     if (ciphername != NULL) {
-        if (!opt_cipher(ciphername, &enc))
+        if (!opt_cipher_any(ciphername, &enc))
             goto opthelp;
     }
     if (export_pkcs12) {
index ea71121fb421fbf7abf1fd3d98440701f587cce2..a2ff0b5be75c834894be863a74155e1f09b39f68 100644 (file)
@@ -367,7 +367,7 @@ int smime_main(int argc, char **argv)
             goto opthelp;
     }
     if (ciphername != NULL) {
-        if (!opt_cipher(ciphername, &cipher))
+        if (!opt_cipher_any(ciphername, &cipher))
             goto opthelp;
     }
     if (!(operation & SMIME_SIGNERS) && (skkeys != NULL || sksigners != NULL)) {