From: Dr. Stephen Henson Date: Tue, 4 Dec 2012 18:35:04 +0000 (+0000) Subject: make -subj always override config file X-Git-Tag: master-post-reformat~1548 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=256f9573c5e1e7cbfbc9264aaf52d9600759e795;p=oweals%2Fopenssl.git make -subj always override config file --- 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;