Created
June 2, 2018 18:09
-
-
Save riipandi/106d3efff427042a1e83aa2e51020007 to your computer and use it in GitHub Desktop.
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 characters
# 1 - Generate Root Certificate | |
openssl genrsa -out LocalRootCA.key 2048 | |
openssl genrsa -des3 -out LocalRootCA.key 2048 | |
openssl req -x509 -new -nodes -key LocalRootCA.key -sha256 -days 365 -out LocalRootCA.crt \ | |
-subj "/C=ID/ST=West Java/L=Sukabumi/O=LocalDev/OU=RnD/CN=Local Development CA/emailAddress=admin@localhost" | |
# 2 - Create Client Certificate | |
export CN="sukabumitoday.test" | |
openssl genrsa -out $CN.key 2048 && openssl req -new -key $CN.key -out $CN.csr \ | |
-subj "/C=ID/ST=West Java/L=Sukabumi/O=Independent/OU=WebDev/CN=$CN/emailAddress=admin@$CN" | |
openssl x509 -req -in $CN.csr -CA LocalRootCA.crt -CAkey LocalRootCA.key -CAcreateserial -out $CN.crt -days 365 -sha256 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment