fix warnings, and harmonize indentation
This commit is contained in:
parent
a9e0953900
commit
27f08d6d48
32
apps/ca.c
32
apps/ca.c
@ -3053,55 +3053,59 @@ X509_NAME *do_subject(char *subject, long chtype)
|
|||||||
sp++; /* skip leading / */
|
sp++; /* skip leading / */
|
||||||
|
|
||||||
while (*sp)
|
while (*sp)
|
||||||
{
|
{
|
||||||
/* collect type */
|
/* collect type */
|
||||||
ne_types[ne_num] = bp;
|
ne_types[ne_num] = bp;
|
||||||
while (*sp)
|
while (*sp)
|
||||||
{
|
{
|
||||||
if (*sp == '\\') /* is there anything to escape in the type...? */
|
if (*sp == '\\') /* is there anything to escape in the type...? */
|
||||||
|
{
|
||||||
if (*++sp)
|
if (*++sp)
|
||||||
*bp++ = *sp++;
|
*bp++ = *sp++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "escape character at end of string\n");
|
BIO_printf(bio_err, "escape character at end of string\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (*sp == '=')
|
else if (*sp == '=')
|
||||||
{
|
{
|
||||||
sp++;
|
sp++;
|
||||||
*bp++ = '\0';
|
*bp++ = '\0';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*bp++ = *sp++;
|
*bp++ = *sp++;
|
||||||
}
|
}
|
||||||
if (!*sp)
|
if (!*sp)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "end of string encountered while processing type of subject name element #%d\n", ne_num);
|
BIO_printf(bio_err, "end of string encountered while processing type of subject name element #%d\n", ne_num);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
ne_values[ne_num] = bp;
|
ne_values[ne_num] = bp;
|
||||||
while (*sp)
|
while (*sp)
|
||||||
{
|
{
|
||||||
if (*sp == '\\')
|
if (*sp == '\\')
|
||||||
|
{
|
||||||
if (*++sp)
|
if (*++sp)
|
||||||
*bp++ = *sp++;
|
*bp++ = *sp++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "escape character at end of string\n");
|
BIO_printf(bio_err, "escape character at end of string\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (*sp == '/')
|
else if (*sp == '/')
|
||||||
{
|
{
|
||||||
sp++;
|
sp++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*bp++ = *sp++;
|
*bp++ = *sp++;
|
||||||
}
|
}
|
||||||
*bp++ = '\0';
|
*bp++ = '\0';
|
||||||
ne_num++;
|
ne_num++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(n = X509_NAME_new()))
|
if (!(n = X509_NAME_new()))
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user