Hi,
Is it possible to give answer of "Sign the certificate? [y/n]:"question to
openssl command with some parameters? I prefer "y" option.
Does openssl accepts "y" option with the following command by default?
openssl ca -batch -key 123456 -config openssl.cnf -out new-cert.pem -infiles
new-req.pem
Sincerelly,
Kadir.
Marek Marcola <[EMAIL PROTECTED]> wrote: Hello,
> I solved the problem. I used "-batch" parameter with openssl with the
> following command. Now I wonder what is the answers of the questions
> (Sign the certificate? [y/n]:"). How can I learn which option [y/n]
> (yes/no) is used?
In OpenSSL source file apps/ca.c look at 'batch' variable, you will
find something like that:
if (!batch)
{
BIO_printf(bio_err,"Sign the certificate? [y/n]:");
(void)BIO_flush(bio_err);
buf[0]='\0';
fgets(buf,sizeof(buf)-1,stdin);
if (!((buf[0] == 'y') || (buf[0] == 'Y')))
{
BIO_printf(bio_err,"CERTIFICATE WILL NOT BE CERTIFIED\n");
ok=0;
goto err;
}
}
as you see, any string starting with 'y' or 'Y' will accept signing.
Best regards,
--
Marek Marcola
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]
---------------------------------
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.