Skip to content

Commit

Permalink
Adjust gencert script for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
josephcummings committed Feb 7, 2024
1 parent e7d7f0c commit 6b48523
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gencert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ docker run --rm --volume $PWD/certs:/tmp --user $(id -u):$(id -g) eventstore/es-

chmod -R 0755 ./certs

echo ">> Copying certificate..."
cp certs/ca/ca.crt /usr/local/share/ca-certificates/eventstore_ca.crt

if [ "${machine}" == "MacOS" ]; then
echo ">> Installing certificate on ${machine}..."
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /usr/local/share/ca-certificates/eventstore_ca.crt
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certs/ca/ca.crt
elif [ "$machine" == "Linux" ] || [ "$machine" == "WSL" ]; then
echo ">> Copying certificate..."
cp certs/ca/ca.crt /usr/local/share/ca-certificates/eventstore_ca.crt
echo ">> Installing certificate on ${machine}..."
sudo update-ca-certificates
else
echo ">> Unknown platform. Please install the certificate manually."
fi
fi

0 comments on commit 6b48523

Please sign in to comment.