summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
authorFlavio Medeiros <flaviomotamedeiros@gmail.com>2016-01-30 20:14:39 -0500
committerRich Salz <rsalz@openssl.org>2016-02-24 16:11:39 -0500
commitb5292f7b40fd5da1feff4d5394f84c629c97eda4 (patch)
tree0b1755c1833784c9df78809fba9ce1e06d5df68a /apps/req.c
parentf7c798e34b50d3cc09629537153bb60ae9ea85fc (diff)
GH480: Don't break statements with CPP stuff.
This is also RT 4137 Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/req.c b/apps/req.c
index facc63967d..28ed036794 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -1120,7 +1120,7 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk,
STACK_OF(CONF_VALUE) *attr_sk, int attribs,
unsigned long chtype)
{
- int i;
+ int i, spec_char, plus_char;
char *p, *q;
char *type;
CONF_VALUE *v;
@@ -1136,24 +1136,26 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk,
/*
* Skip past any leading X. X: X, etc to allow for multiple instances
*/
- for (p = v->name; *p; p++)
+ for (p = v->name; *p; p++) {
#ifndef CHARSET_EBCDIC
- if ((*p == ':') || (*p == ',') || (*p == '.')) {
+ spec_char = ((*p == ':') || (*p == ',') || (*p == '.'));
#else
- if ((*p == os_toascii[':']) || (*p == os_toascii[','])
- || (*p == os_toascii['.'])) {
+ spec_char = ((*p == os_toascii[':']) || (*p == os_toascii[','])
+ || (*p == os_toascii['.']));
#endif
+ if (spec_char) {
p++;
if (*p)
type = p;
break;
}
+ }
#ifndef CHARSET_EBCDIC
- if (*p == '+')
+ plus_char = (*p == '+');
#else
- if (*p == os_toascii['+'])
+ plus_char = (*p == os_toascii['+']);
#endif
- {
+ if (plus_char) {
p++;
mval = -1;
} else