Skip to content

Instantly share code, notes, and snippets.

@developer-guy
Created January 2, 2021 11:19
Show Gist options
  • Save developer-guy/bdd7fc062c051937ebfdeccca1f360f6 to your computer and use it in GitHub Desktop.
Save developer-guy/bdd7fc062c051937ebfdeccca1f360f6 to your computer and use it in GitHub Desktop.
Self Signed Root CA Certificate using mkcert
echo "Creating self-signed CA certificates for TLS and installing them in the local trust stores"
CA_CERTS_FOLDER=$(pwd)/.certs
# This requires mkcert to be installed/available
echo ${CA_CERTS_FOLDER}
rm -rf ${CA_CERTS_FOLDER}
mkdir -p ${CA_CERTS_FOLDER}
mkdir -p ${CA_CERTS_FOLDER}/${ENVIRONMENT_DEV}
# The CAROOT env variable is used by mkcert to determine where to read/write files
# Reference: https://github.com/FiloSottile/mkcert
CAROOT=${CA_CERTS_FOLDER}/${ENVIRONMENT_DEV} mkcert -install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment