diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-08-29 12:06:05 +1000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-09-18 14:20:38 +0100 |
commit | f85a9d26be950f2fe621448af154ed01e514ce0f (patch) | |
tree | dc6abf8f4fc9902da34abfafb017e861e573f3bd /apps/genpkey.c | |
parent | 341c3e7f28072e3c3cfb072233aa7d68abc73d0a (diff) |
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 <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12745)
Diffstat (limited to 'apps/genpkey.c')
-rw-r--r-- | apps/genpkey.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/genpkey.c b/apps/genpkey.c index 9da5b556e8..94453af15c 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: |