-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [GHA] introduce a variable for the docker image suffix, and add placeholder for creating the mrenclave stuff. * [GHA] upload mrenclave file * [GHA] transform sgx mode to lowercase for docker image suffix * [GHA] fix cmd * [docker] include sgx_sign utility in worker image and add `mrenclave` command to the `entry_point.sh` * [GHA] use docker run -t integritee-worker mrenclave to get the mrenclave * [GHA] use consistent capitalization * [docker] fix printing the mrenclave * [docker] add newline at the end of the script * [docker] fix printing mrenclave in docker command * [docker] extract the hex value of the mrenclave in entrypoint.sh * [docker] fix grep command * [GHA] grepping in entrypoint doesn't work for some reason, so you we do it in GHA.
- Loading branch information
Showing
3 changed files
with
58 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# run aesmd in the background | ||
/opt/intel/sgx-aesm-service/aesm/aesm_service | ||
# Check if the first argument is "mrenclave" | ||
if [ "$1" = "mrenclave" ]; then | ||
# If "mrenclave" is provided, execute the corresponding command | ||
$SGX_ENCLAVE_SIGNER dump \ | ||
-enclave /usr/local/bin/enclave.signed.so \ | ||
-dumpfile df.out && \ | ||
/usr/local/bin/extract_identity < df.out && rm df.out | grep -oP ':\s*\K[a-fA-F0-9]+' | ||
|
||
exec /usr/local/bin/integritee-service "${@}" | ||
else | ||
# If no specific command is provided, execute the default unnamed command | ||
|
||
# run aesmd in the background | ||
/opt/intel/sgx-aesm-service/aesm/aesm_service | ||
|
||
exec /usr/local/bin/integritee-service "${@}" | ||
fi |