make -subj always override config file
authorDr. Stephen Henson <steve@openssl.org>
Tue, 4 Dec 2012 18:35:04 +0000 (18:35 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 4 Dec 2012 18:35:04 +0000 (18:35 +0000)
apps/req.c

index 85526581cefed10a9ec539cac8b9a04568a754f9..de1de4c76825ca1b8967250f771df6559e163073 100644 (file)
@@ -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;