self signed certificates - saviovettoor/DevOps-wiki GitHub Wiki
mkdir /opt/ssl
sudo yum install openssl
req -newkey rsa:4096 -nodes -sha256 -keyout /opt/ssl/myapp.example.com.key -x509 -days 365 -out /opt/ssl/myapp.example.com.crt -subj /CN=myapp.example.com
-
req -x509: This specifies that we want to use X.509 certificate signing request (CSR) management.
-
-newkey rsa:4096: This specifies that we want to generate a new certificate and a new key at the same time.The rsa:4096 portion tells it to make an RSA key that is 4096 bits long.
-
-nodes: This tells OpenSSL to skip the option to secure our certificate with a passphrase.
-
-days 365: This option sets the length of time that the certificate will be considered valid.
- -keyout: This line tells OpenSSL where to place the generated private key file that we are creating.
- -out: This tells OpenSSL where to place the certificate that we are creating.