Lorraine1996
Lorraine1996

Reputation: 315

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

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!

Upvotes: 1

Views: 1216

Answers (1)

danadam
danadam

Reputation: 3450

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.

Upvotes: 1

Related Questions