blob: a01cad79a1cf4126ecc99ba7d4dfe50cebe69c8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
diff --git a/opensgx b/opensgx
index b90ff87..b28d02d 100755
--- a/opensgx
+++ b/opensgx
@@ -1,13 +1,7 @@
#! /bin/bash
-ROOT=$(dirname "$0")
-SGXTOOL=$ROOT/user/sgx-tool
-SGX=$ROOT/sgx
-DEVICEKEY=$ROOT/user/conf/device.key
-SGXRUNTIME=$ROOT/user/sgx-runtime
-
key_gen() {
FILENAME=sign.key
- $SGXTOOL -k 3072 > $FILENAME
+ sgx-tool -k 3072 > $FILENAME
}
compile_code() {
@@ -21,15 +15,15 @@ compile_code() {
}
run_enclave() {
- $SGX $SGXRUNTIME $1 $2
+ sgx "$(which sgx-runtime)" $1 $2
}
run_enclave_with_icount() {
- $SGX -i $SGXRUNTIME $1 $2
+ sgx -i "$(which sgx-runtime)" $1 $2
}
measure() {
- $SGXTOOL -m $1
+ sgx-tool -m $1
}
sign() {
@@ -44,10 +38,10 @@ sign() {
touch $CONF
measure $1 > $MEASURE
- $SGXTOOL -S $MEASURE > $SIG
- $SGXTOOL -s $SIG --key=$2 > $CONF
- $SGXTOOL -E $CONF > $TOKEN
- $SGXTOOL -M $TOKEN --key=$DEVICEKEY >> $CONF
+ sgx-tool -S $MEASURE > $SIG
+ sgx-tool -s $SIG --key=$2 > $CONF
+ sgx-tool -E $CONF > $TOKEN
+ sgx-tool -M $TOKEN --key=conf/device.key >> $CONF
rm $MEASURE $SIG $TOKEN
}
|