From 256f9573c5e1e7cbfbc9264aaf52d9600759e795 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 4 Dec 2012 18:35:04 +0000 Subject: [PATCH] make -subj always override config file --- apps/req.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/apps/req.c b/apps/req.c index 85526581ce..de1de4c768 100644 --- a/apps/req.c +++ b/apps/req.c @@ -1159,15 +1159,12 @@ static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int multirdn, /* setup version number */ if (!X509_REQ_set_version(req,0L)) goto err; /* version 1 */ - if (no_prompt) + if (subj) + i = build_subject(req, subj, chtype, multirdn); + else if (no_prompt) i = auto_info(req, dn_sk, attr_sk, attribs, chtype); - else - { - if (subj) - i = build_subject(req, subj, chtype, multirdn); - else - i = prompt_info(req, dn_sk, dn_sect, attr_sk, attr_sect, attribs, chtype); - } + else + i = prompt_info(req, dn_sk, dn_sect, attr_sk, attr_sect, attribs, chtype); if(!i) goto err; if (!X509_REQ_set_pubkey(req,pkey)) goto err; -- 2.25.1