Skip to content

Commit

Permalink
make -subj always override config file
Browse files Browse the repository at this point in the history
  • Loading branch information
snhenson committed Dec 4, 2012
1 parent b6b094f commit 256f957
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions apps/req.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 256f957

Please sign in to comment.