Allow to *just* print key and IV of unstreamable modes when no input files

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17843)
This commit is contained in:
EasySec 2022-03-09 01:00:19 +01:00 committed by Matt Caswell
parent 5266af8737
commit f4f397a5cb
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@ int enc_main(int argc, char **argv)
buff = app_malloc(EVP_ENCODE_LENGTH(bsize), "evp buffer");
if (infile == NULL) {
if (!streamable) {
if (!streamable && printkey != 2) { /* if just print key and exit, it's ok */
BIO_printf(bio_err, "Unstreamable cipher mode\n");
goto end;
}