Import OpenSSL 1.1.0j
This commit is contained in:
14
apps/apps.c
14
apps/apps.c
@@ -1707,8 +1707,14 @@ X509_NAME *parse_name(const char *cp, long chtype, int canmulti)
|
||||
char *work;
|
||||
X509_NAME *n;
|
||||
|
||||
if (*cp++ != '/')
|
||||
if (*cp++ != '/') {
|
||||
BIO_printf(bio_err,
|
||||
"name is expected to be in the format "
|
||||
"/type0=value0/type1=value1/type2=... where characters may "
|
||||
"be escaped by \\. This name is not in that format: '%s'\n",
|
||||
--cp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
n = X509_NAME_new();
|
||||
if (n == NULL)
|
||||
@@ -1764,6 +1770,12 @@ X509_NAME *parse_name(const char *cp, long chtype, int canmulti)
|
||||
opt_getprog(), typestr);
|
||||
continue;
|
||||
}
|
||||
if (*valstr == '\0') {
|
||||
BIO_printf(bio_err,
|
||||
"%s: No value provided for Subject Attribute %s, skipped\n",
|
||||
opt_getprog(), typestr);
|
||||
continue;
|
||||
}
|
||||
if (!X509_NAME_add_entry_by_NID(n, nid, chtype,
|
||||
valstr, strlen((char *)valstr),
|
||||
-1, ismulti ? -1 : 0))
|
||||
|
||||
Reference in New Issue
Block a user