summaryrefslogtreecommitdiffstats
path: root/apps/ca.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-05-30 00:30:52 +0200
committerRich Salz <rsalz@openssl.org>2016-07-20 01:35:38 -0400
commitcdd202f2546f301d128a547d77b27fb4321d249b (patch)
treedd61146dfe0327727a9b02313e1ecf69d1c6624f /apps/ca.c
parent1c72f70df43a0ceb118a990b9554913e26a83696 (diff)
Simplify code related to tmp_email_dn.
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1284)
Diffstat (limited to 'apps/ca.c')
-rw-r--r--apps/ca.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/ca.c b/apps/ca.c
index acbd3886c6..444e454df8 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -239,7 +239,7 @@ int ca_main(int argc, char **argv)
char *extensions = NULL, *extfile = NULL, *key = NULL, *passinarg = NULL;
char *outdir = NULL, *outfile = NULL, *rev_arg = NULL, *ser_status = NULL;
char *serialfile = NULL, *startdate = NULL, *subj = NULL;
- char *prog, *enddate = NULL, *tmp_email_dn = NULL;
+ char *prog, *enddate = NULL;
char *dbfile = NULL, *f, *randfile = NULL;
char buf[3][BSIZE];
char *const *pp;
@@ -766,11 +766,11 @@ end_of_options:
}
if (req) {
- if ((email_dn == 1) && ((tmp_email_dn = NCONF_get_string(conf,
- section,
- ENV_DEFAULT_EMAIL_DN))
- != NULL)) {
- if (strcmp(tmp_email_dn, "no") == 0)
+ if (email_dn == 1) {
+ char *tmp_email_dn = NULL;
+
+ tmp_email_dn = NCONF_get_string(conf, section, ENV_DEFAULT_EMAIL_DN);
+ if (tmp_email_dn != NULL && strcmp(tmp_email_dn, "no") == 0)
email_dn = 0;
}
if (verbose)