summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-05-31 06:51:25 +0200
committerRichard Levitte <levitte@openssl.org>2018-05-31 11:02:21 +0200
commitaf21f71e7c59474271f0c24d58f212fad4032e3a (patch)
tree0058e34699632cfcc640d83025d632e06a2f4cb8 /apps
parent235119f015e46a74040b78b10fd6e954f7f07774 (diff)
apps: when the 'compat' nameopt has been set, leave it be
XN_FLAG_COMPAT has a unique property, its zero for value. This means it needs special treatment; if it has been set (which can only be determined indirectly) and set alone (*), no other flags should be set. (*) if any other nameopt flag has been set by the user, compatibility mode is blown away. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6382) (cherry picked from commit 3190d1dca43ecfd748c06aa06752de06af3768b9)
Diffstat (limited to 'apps')
-rw-r--r--apps/apps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/apps.c b/apps/apps.c
index c5a5152295..07ffad1d0b 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -1359,7 +1359,8 @@ int set_name_ex(unsigned long *flags, const char *arg)
};
if (set_multi_opts(flags, arg, ex_tbl) == 0)
return 0;
- if ((*flags & XN_FLAG_SEP_MASK) == 0)
+ if (*flags != XN_FLAG_COMPAT
+ && (*flags & XN_FLAG_SEP_MASK) == 0)
*flags |= XN_FLAG_SEP_CPLUS_SPC;
return 1;
}