Home > Enterprise >  What is the role of the -signkey option in openssl-req?
What is the role of the -signkey option in openssl-req?

Time:09-28

openssl genrsa -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl x509 -req -in server.csr -out server.crt -signkey server.key -days 3650

This is a popular command for generating self-signed SSL certificates using OpenSSL.

What confuses me is the -signkey parameter in the third command line, what is the use of this option? I don't see it in openssl req -help.

Can anyone answer it please? Thanks in advance!

CodePudding user response:

Why are you looking at req's help? The third line is using x509 command:

]$ openssl x509 -help
...
 -signkey infile       Self sign cert with arg

So it is the key with which you self-sign the certificate.

  • Related