Skip to content

Commit

Permalink
Check if harvester cert matches defined CA cert
Browse files Browse the repository at this point in the history
  • Loading branch information
Starttoaster committed Dec 1, 2023
1 parent 029d93b commit e5edcc3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ cd /chia-blockchain || exit 1
chia ${chia_args} init --fix-ssl-permissions

if [[ -n ${ca} ]]; then
# shellcheck disable=SC2086
chia ${chia_args} init -c "${ca}"
openssl verify -CAfile ${ca}/private_ca.crt ${CHIA_ROOT}/config/ssl/harvester/private_harvester.crt &>/dev/null
if [ ${?} -ne 0 ]; then
echo "initializing from new CA"
chia ${chia_args} init -c "${ca}"
else
echo "using existing CA"
fi
fi

# Enables whatever the default testnet is for the version of chia that is running
Expand Down

0 comments on commit e5edcc3

Please sign in to comment.