apps: use get_cipher_any() instead of get_cipher() for commands that support these ciphers/modes

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15747)
This commit is contained in:
Pauli 2021-06-15 14:07:25 +10:00
parent fa8ff9e4e8
commit a89835f7e0
3 changed files with 4 additions and 4 deletions

View 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;
}

View 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) {

View 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)) {