]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
APPS load_key_certs_crls(): improve error string macro FAIL_NAME
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Mon, 5 Jun 2023 20:53:43 +0000 (22:53 +0200)
committerPauli <pauli@openssl.org>
Sun, 16 Jul 2023 22:48:26 +0000 (08:48 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21129)

apps/lib/apps.c

index 887fa74dea01203b761cb564997b7acb5491066e..1acc991bb821e73257ff624dccb0795593c4e25e 100644 (file)
@@ -908,10 +908,10 @@ static const char *format2string(int format)
         SET_EXPECT(val); \
     }
 #define FAIL_NAME \
-    (ppkey != NULL ? "key etc." : ppubkey != NULL ? "public key etc." : \
-     pparams != NULL ? "params etc." :                                  \
-     pcert != NULL ? "cert etc." : pcerts != NULL ? "certs etc." :      \
-     pcrl != NULL ? "CRL etc." : pcrls != NULL ? "CRLs etc." : NULL)
+    (ppkey != NULL ? "private key" : ppubkey != NULL ? "public key" :  \
+     pparams != NULL ? "key parameters" :                              \
+     pcert != NULL ? "certificate" : pcerts != NULL ? "certificates" : \
+     pcrl != NULL ? "CRL" : pcrls != NULL ? "CRLs" : NULL)
 /*
  * Load those types of credentials for which the result pointer is not NULL.
  * Reads from stdio if uri is NULL and maybe_stdin is nonzero.