summaryrefslogtreecommitdiffstats
path: root/apps/ca.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-08-27 00:08:17 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-08-27 00:08:17 +0000
commit87a25f90324aa6f48d903a22852ff2ce1aa9dde0 (patch)
treebcd666bfc43093138c8be8ed9256b1ba899a4901 /apps/ca.c
parentf9150e54214b26fb03f9d933926cb1176198d6c0 (diff)
Allow the extension section specified in config files to be overridden
on the command line for various utilities.
Diffstat (limited to 'apps/ca.c')
-rw-r--r--apps/ca.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/apps/ca.c b/apps/ca.c
index fa355ab0c9..e1eb275d40 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -163,6 +163,8 @@ static char *ca_usage[]={
" -batch - Don't ask questions\n",
" -msie_hack - msie modifications to handle all those universal strings\n",
" -revoke file - Revoke a certificate (given in file)\n",
+" -extensions .. - Extension section (override value in config file)\n",
+" -crlexts .. - CRL extension section (override value in config file)\n",
NULL
};
@@ -393,6 +395,16 @@ EF_ALIGNMENT=0;
infile= *(++argv);
dorevoke=1;
}
+ else if (strcmp(*argv,"-extensions") == 0)
+ {
+ if (--argc < 1) goto bad;
+ extensions= *(++argv);
+ }
+ else if (strcmp(*argv,"-crlexts") == 0)
+ {
+ if (--argc < 1) goto bad;
+ crl_ext= *(++argv);
+ }
else
{
bad:
@@ -720,8 +732,8 @@ bad:
lookup_fail(section,ENV_SERIAL);
goto err;
}
-
- extensions=CONF_get_string(conf,section,ENV_EXTENSIONS);
+ if(!extensions)
+ extensions=CONF_get_string(conf,section,ENV_EXTENSIONS);
if(extensions) {
/* Check syntax of file */
X509V3_CTX ctx;
@@ -1031,7 +1043,7 @@ bad:
/*****************************************************************/
if (gencrl)
{
- crl_ext=CONF_get_string(conf,section,ENV_CRLEXT);
+ if(!crl_ext) crl_ext=CONF_get_string(conf,section,ENV_CRLEXT);
if(crl_ext) {
/* Check syntax of file */
X509V3_CTX ctx;