Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
LeelaChacha committed Feb 25, 2025
1 parent 1aa5fca commit 1578509
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scripts/tests/setup_https_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,13 @@ for cert in $HOME/.local/share/ca-certificates/*.crt; do
done

# Set the environment variable so that SSL/TLS libraries use the custom CA store
if [ -z "${GITHUB_ACTIONS}" ]; then
export SSL_CERT_DIR=$HOME/.local/share/ca-certificates
export CURL_CA_BUNDLE=$SSL_CERT_DIR/server.crt
if [[ "$OSTYPE" == "darwin"* ]]; then
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain $CERT_FILE
else
echo SSL_CERT_DIR=$HOME/.local/share/ca-certificates >> $GITHUB_ENV
echo CURL_CA_BUNDLE=$SSL_CERT_DIR/server.crt >> $GITHUB_ENV
fi

if [[ "$OSTYPE" == "darwin"* ]]; then
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain $CERT_FILE
fi

# Start Python HTTPS server
echo "Serving $DIRECTORY_TO_SERVE on https://localhost:$PORT"
go run "$(dirname "$0")/https_server.go" -dir "$DIRECTORY_TO_SERVE" -certfile "$CERT_FILE" -keyfile "$KEY_FILE" -port "$PORT" &

0 comments on commit 1578509

Please sign in to comment.