I am making a self signed certificate using OpenSSL. I want to make the certificate in one go, means that it will not ask me for the input for Company Name, Common Name etc etc. Is there anyway to do this like a switch e.g. /noprompt or any other through which I can input my all fields in one go. Is it possible that the following command takes all arguments in this call which it takes after pressing enter

openssl x509 -req -days 30 -in request.pem -signkey key.pem -out certificate.pem
link|improve this question
feedback

migrated from stackoverflow.com Jun 24 '10 at 0:07

This question came from our site for professional and enthusiast programmers.

2 Answers

You can fill a file beforehand to automate the process of creating certificates, in the section named:

"Sample configuration file prompting for field values"

Link: http://www.openssl.org/docs/apps/req.html#EXAMPLES

link|improve this answer
feedback

You need to specify the subject as part of your command.

This command is one step, non-interactive, self-signed certificate creation.

openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout www.example.com.key  -out www.example.com.cert
link|improve this answer
feedback

Your Answer

 
or
required, but never shown