Skip to content

Commit

Permalink
stepped pccs_addr / pccs_url env vars for entry script.
Browse files Browse the repository at this point in the history
  • Loading branch information
anixon604 committed Jun 26, 2024
1 parent a3196b8 commit 2b6ed86
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions go/enclave/main/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ if [ ! -L /dev/sgx/enclave ]; then
ln -s /dev/sgx_enclave /dev/sgx/enclave
fi

PCCS_URL=${PCCS_URL:-https://global.acccache.azure.net/sgx/certification/v4/}
echo "PCCS_URL: ${PCCS_URL}"
# Determine PCCS_URL based on precedence
if [ -n "$PCCS_URL" ]; then
PCCS_FINAL_URL=$PCCS_URL
elif [ -n "$PCCS_ADDR" ]; then
PCCS_FINAL_URL="${PCCS_ADDR}/sgx/certification/v4/"
else
PCCS_FINAL_URL="https://global.acccache.azure.net/sgx/certification/v4/"
fi

echo "PCCS_URL: ${PCCS_FINAL_URL}"

apt-get install -qq libsgx-dcap-default-qpl

echo "PCCS_URL=${PCCS_URL}\nUSE_SECURE_CERT=FALSE" > /etc/sgx_default_qcnl.conf
echo "PCCS_URL=${PCCS_FINAL_URL}\nUSE_SECURE_CERT=FALSE" > /etc/sgx_default_qcnl.conf

"$@"

0 comments on commit 2b6ed86

Please sign in to comment.