From: Shane Lontis Date: Sat, 29 Aug 2020 02:06:05 +0000 (+1000) Subject: Add error message to genpkey app for the '-genparam' option X-Git-Tag: openssl-3.0.0-alpha7~199 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f85a9d26be950f2fe621448af154ed01e514ce0f;p=thirdparty%2Fopenssl.git Add error message to genpkey app for the '-genparam' option The ordering of this option is important so inform the user if they do it incorrectly. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/12745) --- diff --git a/apps/genpkey.c b/apps/genpkey.c index 9da5b556e8c..94453af15ce 100644 --- a/apps/genpkey.c +++ b/apps/genpkey.c @@ -125,8 +125,12 @@ int genpkey_main(int argc, char **argv) } break; case OPT_GENPARAM: - if (ctx != NULL) + if (ctx != NULL) { + BIO_printf(bio_err, + "%s: '-genparam' option must be set before" + " the '-algorithm' option.\n", prog); goto opthelp; + } do_param = 1; break; case OPT_TEXT: