back Creating an self-signed SSL certificate
comp
publication: Novembro 12 2021 15:31
last update: Novembro 12 2021 15:31
# openssl req -newkey rsa:4096 -sha256 -nodes -x509 \
-subj "/C=BR/ST=MS/L=Dourados/O=AB\ Labs/CN=adrianobarbosa.xyz" \
-days 365 -keyout server.key -out server.crt
From the man page:
- req command can create self-signed certificates, for use as root CAs
- -newkey rsa:4096 create a new certificate request and a new private RSA key with 4096 bits in size
- -sha256 the message digest to sign the request with
- -nodes do not encrypt the private key
- -x509 output a self-signed certificate
- -subj the subject field of the request
- -days number of days to certify the certificate for
- -keyout file to write the newly created private key to
- -out output file to write to