" -policy arg - The CA 'policy' to support\n",
" -keyfile arg - PEM private key file\n",
" -key arg - key to decode the private key if it is encrypted\n",
-" -cert - The CA certificate\n",
+" -cert file - The CA certificate\n",
" -in file - The input PEM encoded certificate request(s)\n",
" -out file - Where to put the output file(s)\n",
" -outdir dir - Where to put output certificates\n",
BIO_printf(bio_err,"problems opening %s for extra oid's\n",p);
ERR_print_errors(bio_err);
*/
+ ERR_clear_error();
}
else
{
}
extensions=CONF_get_string(conf,section,ENV_EXTENSIONS);
- if(!extensions) {
-
+ if(extensions) {
/* Check syntax of file */
- if(!X509V3_EXT_add_conf(conf, NULL, extensions, NULL)) {
+ if(!X509V3_EXT_check_conf(conf, extensions)) {
BIO_printf(bio_err,
"Error Loading extension section %s\n",
extensions);
/* Lets add the extensions, if there are any */
if (ext_sect)
{
+ X509V3_CTX ctx;
if (ci->version == NULL)
if ((ci->version=ASN1_INTEGER_new()) == NULL)
goto err;
ci->extensions = NULL;
- if(!X509V3_EXT_add_conf(conf, NULL, ext_sect, ret)) goto err;
+ ctx.subject_cert = ret;
+ ctx.issuer_cert = x509;
+ ctx.subject_req = req;
+ ctx.crl = NULL;
+ ctx.flags = 0;
+
+ if(!X509V3_EXT_add_conf(conf, &ctx, ext_sect, ret)) goto err;
}