Create a self-signed certificate for testing
create self signed certificate openssl | generate test ssl certificate | ssl certificate for localhost | openssl self signed cert one liner | openssl | self-signed | certificate | testingCaution: This command changes the system. Understand what it does before you run it.
openssl req -x509 -newkey rsa:2048 -nodes -days 365 -keyout test.key -out test.crt -subj "/CN=test.example.com" -addext "subjectAltName=DNS:test.example.com"Generates an unencrypted RSA key and a certificate signed with it, valid for the given number of days. Browsers show a warning for it, but it is good enough for staging servers, internal tools or testing the web server configuration. The SAN entry is required because current browsers no longer accept the common name alone.
Note: Existing files with the same name are overwritten. For public websites, always use a certificate from a real CA.
Also searched as
- create self signed certificate openssl
- generate test ssl certificate
- ssl certificate for localhost
- openssl self signed cert one liner