apps.c: improve warning texts of parse_name() when skipping RDN input

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/21659)
This commit is contained in:
Dr. David von Oheimb 2023-08-04 08:23:58 +02:00 committed by Hugo Landau
parent 81d037b8ad
commit 49e097344b
1 changed files with 4 additions and 3 deletions

View File

@ -1977,16 +1977,17 @@ X509_NAME *parse_name(const char *cp, int chtype, int canmulti,
nid = OBJ_txt2nid(typestr);
if (nid == NID_undef) {
BIO_printf(bio_err,
"%s: Skipping unknown %s name attribute \"%s\"\n",
"%s warning: Skipping unknown %s name attribute \"%s\"\n",
opt_getprog(), desc, typestr);
if (ismulti)
BIO_printf(bio_err,
"Hint: a '+' in a value string needs be escaped using '\\' else a new member of a multi-valued RDN is expected\n");
"%s hint: a '+' in a value string needs be escaped using '\\' else a new member of a multi-valued RDN is expected\n",
opt_getprog());
continue;
}
if (*valstr == '\0') {
BIO_printf(bio_err,
"%s: No value provided for %s name attribute \"%s\", skipped\n",
"%s warning: No value provided for %s name attribute \"%s\", skipped\n",
opt_getprog(), desc, typestr);
continue;
}