From f4f397a5cb5b6eec3045047b9406a43fdd6d6602 Mon Sep 17 00:00:00 2001 From: EasySec Date: Wed, 9 Mar 2022 01:00:19 +0100 Subject: Allow to *just* print key and IV of unstreamable modes when no input files Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/17843) --- apps/enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/enc.c') diff --git a/apps/enc.c b/apps/enc.c index d50baa6d2f..eb06756c5c 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -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; } -- cgit v1.2.3