]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/cmp.c: Fix glitch in -newkeypass warning and extend warnings for genm
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Fri, 3 Dec 2021 09:36:50 +0000 (10:36 +0100)
committerHugo Landau <hlandau@openssl.org>
Fri, 1 Jul 2022 06:41:13 +0000 (07:41 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18657)

apps/cmp.c

index 3cd0ffcbe209a62353fb0a5aeb16f59d486b421c..a433f2b324afa38d97ecab57064ce9adfba139c6 100644 (file)
@@ -1583,11 +1583,11 @@ static int setup_request_ctx(OSSL_CMP_CTX *ctx, ENGINE *engine)
             && opt_oldcert == NULL && opt_cert == NULL)
         CMP_warn("missing -recipient, -srvcert, -issuer, -oldcert or -cert; recipient will be set to \"NULL-DN\"");
 
-    if (opt_cmd == CMP_P10CR || opt_cmd == CMP_RR) {
-        const char *msg = "option is ignored for 'p10cr' and 'rr' commands";
+    if (opt_cmd == CMP_P10CR || opt_cmd == CMP_RR || opt_cmd == CMP_GENM) {
+        const char *msg = "option is ignored for 'p10cr', 'rr', and 'genm' commands";
 
         if (opt_newkeypass != NULL)
-            CMP_warn1("-newkeytype %s", msg);
+            CMP_warn1("-newkeypass %s", msg);
         if (opt_newkey != NULL)
             CMP_warn1("-newkey %s", msg);
         if (opt_days != 0)