NOTE: These instructions are a work in progress. Don't trust them yet.
- mkcert
- shadow-cljs
- jEnv (optional)
-
Create a certificate authority and install it into the system, browser, and Java trust stores.
# For mkcert to install the certificate into the Java trust store, $JAVA_HOME must be set. # # If you use jenv, running mkcert -install with jenv exec ensures that it is. # # If you don't use jenv, you have to make sure $JAVA_HOME points to your Java installation directory # and run `mkcert -install` instead. $ jenv exec mkcert -install
-
Generate a certificate for localhost using the certificate authority
mkcert
created.$ mkcert localhost
-
Convert the certificate into the PKCS #12 format.
$ openssl pkcs12 -export -inkey localhost-key.pem -in localhost.pem -name localhost -out $TMPDIR/localhost.p12 -password pass:shadow-cljs
-
Import the PKCS #12 certificate into a Java KeyStore.
$ mkdir -p ssl $ keytool -importkeystore -srckeystore $TMPDIR/localhost.p12 -srcstoretype pkcs12 -destkeystore ssl/keystore.jks -storepass shadow-cljs -srcstorepass shadow-cljs
-
Follow the instructions in the shadow-cljs manual to enable SSL for the shadow-cljs development server.