Generate a self-signed SSL certificate

Generates a self-signed SSL certificate using OpenSSL. Beware, self-signed certificates are typically not validated with any third party. It's recommended to use a certificate signed by a certifiate authority.

Authored by: Diego Woitasen
key_file
cert_file
expiration_days

Command
Copy
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days "365"
Tags