diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-08-27 00:08:17 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-08-27 00:08:17 +0000 |
commit | 87a25f90324aa6f48d903a22852ff2ce1aa9dde0 (patch) | |
tree | bcd666bfc43093138c8be8ed9256b1ba899a4901 /apps/ca.c | |
parent | f9150e54214b26fb03f9d933926cb1176198d6c0 (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.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -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; |