Skip to content

Commit

Permalink
Need to run pccs service under ECDSA mode
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhaixian1984 committed Apr 20, 2024
1 parent 629a5c6 commit 9d13884
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docker/runner/start_sworker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version=$(cat /crust-sworker/VERSION | head -n 1)
crustsworkerdir=$crustdir/crust-sworker/$version
crust_env_file=$crustsworkerdir/etc/environment
inteldir=/opt/intel
pccs_port=9999

echo "Starting curst sworker $version"
source $crust_env_file
Expand All @@ -31,5 +32,20 @@ for el in $(cpuid | grep -i "SGX launch config" | awk '{print $NF}'); do
fi
done

if [ x"$SGXTYPE" = x"--ecdsa" ]; then
echo "Run pccs service under ECDSA mode. Wait $wait_time seconds for pccs service fully start"

cd /opt/intel/sgx-dcap-pccs
nohup node pccs_server.js &>/dev/null &
pid=$!
cd - &>/dev/null

sleep 10
if ! lsof -i :$pccs_port | grep $pid &>/dev/null; then
verbose ERROR "start pccs service failed! Please check if another process is occupying port $pccs_port"
exit 1
fi
fi

echo "Run sworker with arguments: $ARGS"
/opt/crust/crust-sworker/$version/bin/crust-sworker $SGXTYPE $ARGS

0 comments on commit 9d13884

Please sign in to comment.