Last active
October 11, 2025 14:12
-
-
Save taoyuan/39d9bc24bafc8cc45663683eae36eb1a to your computer and use it in GitHub Desktop.
Revisions
-
taoyuan revised this gist
Aug 7, 2020 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \ -subj "/C=GB/ST=London/L=London/O=Global Security/OU=R&D Department/CN=example.com" \ -keyout cert.key -out cert.crt -
taoyuan created this gist
Aug 7, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ ## Generation of a Self Signed Certificate Generation of a self-signed SSL certificate involves a simple 3-step procedure: __STEP 1__: Create the server private key ```sh openssl genrsa -out cert.key 2048 ``` __STEP 2__: Create the certificate signing request (CSR) ```sh openssl req -new -key cert.key -out cert.csr ``` __STEP 3__: Sign the certificate using the private key and CSR ```sh openssl x509 -req -days 3650 -in cert.csr -signkey cert.key -out cert.crt ``` Congratulations! You now have a self-signed SSL certificate valid for 10 years.