From: EasySec Date: Wed, 9 Mar 2022 00:00:19 +0000 (+0100) Subject: Allow to *just* print key and IV of unstreamable modes when no input files X-Git-Tag: openssl-3.2.0-alpha1~2866 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4f397a5cb5b6eec3045047b9406a43fdd6d6602;p=thirdparty%2Fopenssl.git 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) --- diff --git a/apps/enc.c b/apps/enc.c index d50baa6d2f6..eb06756c5c4 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; }