From 4a91c11f9f3b2ac391a53f766b385322c8a2d6fc Mon Sep 17 00:00:00 2001 From: "zongmin.gu" Date: Sun, 26 Sep 2021 13:47:28 +0800 Subject: [PATCH] Update enclave_tls demo with bom file --- demos/enclave_tls/enclave_tls.yaml | 11 +++++++++++ demos/enclave_tls/run_enclave_tls_server_in_occlum.sh | 8 ++------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 demos/enclave_tls/enclave_tls.yaml diff --git a/demos/enclave_tls/enclave_tls.yaml b/demos/enclave_tls/enclave_tls.yaml new file mode 100644 index 00000000..6a45a530 --- /dev/null +++ b/demos/enclave_tls/enclave_tls.yaml @@ -0,0 +1,11 @@ +includes: + - base.yaml +targets: + - target: /bin + copy: + - files: + - /usr/share/enclave-tls/samples/enclave-tls-server + - target: /opt/enclave-tls + copy: + - dirs: + - /opt/enclave-tls/lib diff --git a/demos/enclave_tls/run_enclave_tls_server_in_occlum.sh b/demos/enclave_tls/run_enclave_tls_server_in_occlum.sh index 584be2c0..0c0adc7d 100755 --- a/demos/enclave_tls/run_enclave_tls_server_in_occlum.sh +++ b/demos/enclave_tls/run_enclave_tls_server_in_occlum.sh @@ -8,12 +8,8 @@ cd occlum_workspace occlum init # 2. Copy files into Occlum Workspace and Build -cp -f /usr/share/enclave-tls/samples/enclave-tls-server image/bin -cp -f /opt/occlum/glibc/lib/libdl.so.2 image/opt/occlum/glibc/lib -cp -f /usr/lib/x86_64-linux-gnu/libssl.so.1.1 image/opt/occlum/glibc/lib -cp -f /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 image/opt/occlum/glibc/lib -mkdir -p image/opt/enclave-tls -cp -rf /opt/enclave-tls/lib image/opt/enclave-tls +rm -rf image && \ +copy_bom -f ../enclave_tls.yaml --root image --include-dir /opt/occlum/etc/template && \ occlum build # 3. Run enclave_tls_server