projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e1c191f
)
fix warnings, and harmonize indentation
author
Bodo Möller
<bodo@openssl.org>
Wed, 23 Oct 2002 13:11:38 +0000
(13:11 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Wed, 23 Oct 2002 13:11:38 +0000
(13:11 +0000)
apps/ca.c
patch
|
blob
|
history
diff --git
a/apps/ca.c
b/apps/ca.c
index 22c9f820c561c60d388cca29bfa5a77bab8a6c15..4867f309c7a0645aa4c24d7083942ad15d52684b 100644
(file)
--- a/
apps/ca.c
+++ b/
apps/ca.c
@@
-3055,68
+3055,72
@@
X509_NAME *do_subject(char *subject, long chtype)
int nid;
if (!buf || !ne_types || !ne_values)
int nid;
if (!buf || !ne_types || !ne_values)
- {
+
{
BIO_printf(bio_err, "malloc error\n");
goto error;
BIO_printf(bio_err, "malloc error\n");
goto error;
- }
+ }
if (*subject != '/')
if (*subject != '/')
- {
+
{
BIO_printf(bio_err, "Subject does not start with '/'.\n");
goto error;
BIO_printf(bio_err, "Subject does not start with '/'.\n");
goto error;
- }
+
}
sp++; /* skip leading / */
while (*sp)
sp++; /* skip leading / */
while (*sp)
- {
+
{
/* collect type */
ne_types[ne_num] = bp;
while (*sp)
/* collect type */
ne_types[ne_num] = bp;
while (*sp)
- {
+
{
if (*sp == '\\') /* is there anything to escape in the type...? */
if (*sp == '\\') /* is there anything to escape in the type...? */
+ {
if (*++sp)
*bp++ = *sp++;
if (*++sp)
*bp++ = *sp++;
- else
- {
+ else
+
{
BIO_printf(bio_err, "escape character at end of string\n");
goto error;
BIO_printf(bio_err, "escape character at end of string\n");
goto error;
- }
+ }
+ }
else if (*sp == '=')
else if (*sp == '=')
- {
+
{
sp++;
*bp++ = '\0';
break;
sp++;
*bp++ = '\0';
break;
- }
+
}
else
*bp++ = *sp++;
else
*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);
goto error;
BIO_printf(bio_err, "end of string encountered while processing type of subject name element #%d\n", ne_num);
goto error;
- }
+
}
ne_values[ne_num] = bp;
while (*sp)
ne_values[ne_num] = bp;
while (*sp)
- {
+
{
if (*sp == '\\')
if (*sp == '\\')
+ {
if (*++sp)
*bp++ = *sp++;
else
if (*++sp)
*bp++ = *sp++;
else
- {
+
{
BIO_printf(bio_err, "escape character at end of string\n");
goto error;
BIO_printf(bio_err, "escape character at end of string\n");
goto error;
+ }
}
else if (*sp == '/')
}
else if (*sp == '/')
- {
+
{
sp++;
break;
sp++;
break;
- }
+
}
else
*bp++ = *sp++;
else
*bp++ = *sp++;
- }
+
}
*bp++ = '\0';
ne_num++;
*bp++ = '\0';
ne_num++;
- }
+ }
if (!(n = X509_NAME_new()))
goto error;
if (!(n = X509_NAME_new()))
goto error;