nitro-stack/stack-orchestrator/config/go-nitro/create-certs.sh
prathamesh0 ce2258db07
Add a stack for Nitro bridge (#4)
* Add a bridge stack

* Implement Nitro contracts deployment to L1 and L2

* Deploy custom tokens to L1 and L2

* Add a service for Nitro bridge

* Setup a service for nitro-rpc-client with required certs
2024-07-19 10:57:46 +05:30

21 lines
540 B
Bash
Executable File

#!/bin/bash
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
cert_file="/app/tls/statechannels.org.pem"
key_file="/app/tls/statechannels.org_key.pem"
# Check if the cert already exists
if [ -f "$cert_file" ] ; then
echo "Cert file ${cert_file} already exists"
else
echo "Creating certs"
mkcert -cert-file $cert_file -key-file $key_file statechannels.org localhost 127.0.0.1 $CERC_NITRO_PUBLIC_RPC_HOST ::1
# Copy over the rootCA cert so that it can be used by the client
cp -r $(mkcert -CAROOT)/* /app/mkcert-caroot
fi