Created
April 3, 2021 22:10
-
-
Save johnhpatton/0f34c7a9e7f0a5a4ea4e5126d3c5061e to your computer and use it in GitHub Desktop.
Create a Local CA root certificate.
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
#!/usr/bin/env bash | |
# Create the CA root signing key | |
openssl genrsa -out "./ca.key" 2048 | |
# Create the CA root certificate | |
openssl req -x509 -new -nodes \ | |
-days 3650 \ | |
-reqexts v3_req \ | |
-extensions v3_ca \ | |
-subj "/CN=Local CA Root" \ | |
-key "./ca.key" \ | |
-out "./ca.pem" | |
echo "Local CA root certificate (ca.pem) and key (ca.key) have been created." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment