Created
March 21, 2015 10:19
-
-
Save gil-obradors/4ea26cb8e3ae010df8ab to your computer and use it in GitHub Desktop.
SSL cheats
This file contains 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 characters
# Create CA | |
openssl genrsa -out ca.key 4096 | |
openssl req -new -x509 -nodes -sha1 -days 1825 -key ca.key -out ca.crt | |
# Create Intermediate | |
openssl genrsa -out intermediate.key 4096 | |
openssl req -new -sha1 -key intermediate.key -out intermediate.csr | |
# CA signs Intermediate | |
openssl x509 -req -days 1825 -in intermediate.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out intermediate.crt | |
# Create Server | |
openssl genrsa -out test.example.com.key 4096 | |
openssl req -new -key test.example.com.key -out test.example.com.csr | |
# Intermediate signs Server | |
openssl x509 -req -days 1825 -in test.example.com.csr -CA intermediate.crt -CAkey intermediate.key -set_serial 01 -out test.example.com.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment