@super-protocol/addons-tee 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bindings/build-sgx-native.sh +9 -0
- package/bindings/sgx-native/build/Release/libcjson.so.1 +0 -0
- package/bindings/sgx-native/build/Release/libmbedcrypto_gramine.so.12 +0 -0
- package/bindings/sgx-native/build/Release/libmbedx509_gramine.so.4 +0 -0
- package/bindings/sgx-native/build/Release/libsgx_dcap_quoteverify.so.1 +0 -0
- package/bindings/sgx-native/build/Release/libsgx_util.so +0 -0
- package/bindings/sgx-native/build/Release/sgx_native.node +0 -0
- package/bindings/sgx-native/docker_build.sh +78 -0
- package/package.json +1 -1
- package/bindings/sgx-native/build/Release/libdcap_quoteprov.so.1 +0 -0
- package/bindings/sgx-native/build/Release/libmbedcrypto_gramine.so.6 +0 -0
- package/bindings/sgx-native/build/Release/libmbedx509_gramine.so.1 +0 -0
- package/bindings/sgx-native/build/Release/libsgx_default_qcnl_wrapper.so.1 +0 -0
- package/bindings/sgx-native/build/Release/libsgx_urts.so.1 +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
# Install deps
|
|
5
|
+
apt update
|
|
6
|
+
DEBIAN_FRONTEND=noninteractive apt install -y git wget make gcc g++ curl cmake clang meson libssl-dev libsgx-dcap-quote-verify-dev libcurl4-openssl-dev
|
|
7
|
+
|
|
8
|
+
# Download and install Intel SDK
|
|
9
|
+
cd /opt/intel
|
|
10
|
+
wget https://download.01.org/intel-sgx/sgx-linux/2.18/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.18.100.3.bin
|
|
11
|
+
chmod +x sgx_linux_x64_sdk_2.18.100.3.bin
|
|
12
|
+
echo yes | ./sgx_linux_x64_sdk_2.18.100.3.bin
|
|
13
|
+
rm -f sgx_linux_x64_sdk_2.18.100.3.bin
|
|
14
|
+
|
|
15
|
+
# Clone and Build QVL
|
|
16
|
+
cd /app
|
|
17
|
+
git clone --single-branch -b DCAP_1.15 https://github.com/intel/SGXDataCenterAttestationPrimitives.git
|
|
18
|
+
cd /app/SGXDataCenterAttestationPrimitives/QuoteVerification/QVL/Src
|
|
19
|
+
./release
|
|
20
|
+
|
|
21
|
+
# Clone and Download mbedtls lib
|
|
22
|
+
cd /app
|
|
23
|
+
git clone --single-branch -b v1.3.1 https://github.com/gramineproject/gramine.git
|
|
24
|
+
cd /app/gramine
|
|
25
|
+
meson subprojects download
|
|
26
|
+
|
|
27
|
+
# Clone and Build NAPI Stubs
|
|
28
|
+
cd /app
|
|
29
|
+
git clone --single-branch -b main https://github.com/napi-bindings/node-api-stub.git
|
|
30
|
+
cd /app/node-api-stub
|
|
31
|
+
git checkout a253cf6
|
|
32
|
+
mkdir ./build
|
|
33
|
+
cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" -S ./ -B ./build
|
|
34
|
+
cmake --build ./build
|
|
35
|
+
|
|
36
|
+
# Install nodejs
|
|
37
|
+
curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
|
38
|
+
DEBIAN_FRONTEND=noninteractive apt install -y nodejs
|
|
39
|
+
|
|
40
|
+
# Build addon
|
|
41
|
+
cd /app/src/
|
|
42
|
+
export GRAMINE_PATH=/app/gramine
|
|
43
|
+
export SGX_PRIMITIVES=/app/SGXDataCenterAttestationPrimitives
|
|
44
|
+
export NODE_API_STUB=/app/node-api-stub/build
|
|
45
|
+
|
|
46
|
+
npm i -g node-addon-api node-gyp nan
|
|
47
|
+
MBEDTLS=$(find ${GRAMINE_PATH}/subprojects/mbedtls* -maxdepth 0 -type d)
|
|
48
|
+
if [ $? -eq 0 ]; then
|
|
49
|
+
MBEDTLS=$(find ${MBEDTLS}/mbedtls* -maxdepth 0 -type d)
|
|
50
|
+
if [ $? -eq 0 ]; then
|
|
51
|
+
echo "MBEDTLS found in ${MBEDTLS}"
|
|
52
|
+
export MBEDTLS=${MBEDTLS}
|
|
53
|
+
else
|
|
54
|
+
echo "MBEDTLS not found"
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
else
|
|
58
|
+
echo "MBEDTLS not found"
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
export NODE_PATH=$(npm root -g)
|
|
63
|
+
|
|
64
|
+
rm -rf /app/src/build
|
|
65
|
+
npx node-gyp configure build
|
|
66
|
+
strip ./build/Release/sgx_native.node
|
|
67
|
+
|
|
68
|
+
BUILD_DIR=/app/src/build/Release
|
|
69
|
+
cp /usr/lib/x86_64-linux-gnu/libmbedcrypto_gramine.so.12 ${BUILD_DIR}
|
|
70
|
+
cp /usr/lib/x86_64-linux-gnu/libmbedx509_gramine.so.4 ${BUILD_DIR}
|
|
71
|
+
cp /usr/lib/x86_64-linux-gnu/libsgx_dcap_quoteverify.so.1 ${BUILD_DIR}
|
|
72
|
+
cp /usr/lib/x86_64-linux-gnu/libsgx_util.so ${BUILD_DIR}
|
|
73
|
+
cp /usr/lib/x86_64-linux-gnu/libcjson.so.1 ${BUILD_DIR} #only for tests
|
|
74
|
+
|
|
75
|
+
# libsgx_default_qcnl_wrapper.so.1 and libdcap_quoteprov.so.1 installed with the package libsgx_dcap_default_qpl
|
|
76
|
+
|
|
77
|
+
#TODO: CHECK NEXT LIBS
|
|
78
|
+
#libsgx_urts.so.1
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|