Skip to content

Commit 735b067

Browse files
authored
Merge pull request #657 from LayerXcom/fix-verify-mr-enclave-enable-feature
フィーチャーverify-mr-enclave-enableにおける抜け漏れ対応
2 parents a311b06 + 0ab613e commit 735b067

18 files changed

Lines changed: 142 additions & 34 deletions

File tree

example/encrypted-sql-ops/enclave/Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ crate-type = ["staticlib"]
1010

1111
[dependencies]
1212
frame-config = { path = "../../../frame/config", default-features = false, features = ["sgx"] }
13-
frame-enclave = { path = "../../../frame/enclave" }
13+
frame-enclave = { path = "../../../frame/enclave", default-features = false }
1414
frame-types = { path = "../../../frame/types" }
15-
module-encrypted-sql-ops-enclave = { path = "../../../modules/encrypted-sql-ops-enclave" }
15+
module-encrypted-sql-ops-enclave = { path = "../../../modules/encrypted-sql-ops-enclave", default-features = false }
1616
module-encrypted-sql-ops-ecall-types = { path = "../../../modules/encrypted-sql-ops-ecall-types", default-features = false, features = ["sgx"] }
1717
sgx_tstd = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git"}
1818
anyhow = { rev = "sgx_1.1.3", git = "https://github.com/mesalock-linux/anyhow-sgx.git" }
@@ -22,5 +22,9 @@ env_logger = { git = "https://github.com/mesalock-linux/env_logger-sgx", default
2222
log = { git = "https://github.com/mesalock-linux/log-sgx" }
2323

2424
[features]
25-
default = []
25+
default = ["verify-mr-enclave-enable"]
2626
runtime_enabled = []
27+
verify-mr-enclave-enable = [
28+
"frame-enclave/verify-mr-enclave-enable",
29+
"module-encrypted-sql-ops-enclave/verify-mr-enclave-enable",
30+
]

example/erc20/enclave/Cargo.toml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ crate-type = ["staticlib"]
1111
[dependencies]
1212
frame-runtime = { path = "../../../frame/runtime", default-features = false, features = ["sgx"] }
1313
frame-config = { path = "../../../frame/config", default-features = false, features = ["sgx"] }
14-
frame-enclave = { path = "../../../frame/enclave" }
14+
frame-enclave = { path = "../../../frame/enclave", default-features = false }
1515
frame-sodium = { path = "../../../frame/sodium", default-features = false, features = ["sgx"] }
1616
frame-types = { path = "../../../frame/types" }
1717
frame-common = { path = "../../../frame/common", default-features = false, features = ["sgx"] }
@@ -27,8 +27,14 @@ env_logger = { git = "https://github.com/mesalock-linux/env_logger-sgx", default
2727
log = { git = "https://github.com/mesalock-linux/log-sgx" }
2828

2929
[features]
30-
default = ["backup-enable", "runtime_enabled", "enclave_key"]
30+
default = ["backup-enable", "runtime_enabled", "enclave_key", "verify-mr-enclave-enable"]
3131
backup-enable = ["anonify-enclave/backup-enable"]
3232
runtime_enabled = []
3333
enclave_key = []
34-
treekem = []
34+
treekem = []
35+
verify-mr-enclave-enable = [
36+
"frame-runtime/verify-mr-enclave-enable",
37+
"frame-enclave/verify-mr-enclave-enable",
38+
"anonify-enclave/verify-mr-enclave-enable",
39+
"anonify-ecall-types/verify-mr-enclave-enable",
40+
]

example/erc20/server/Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ opentelemetry-jaeger = { version = "0.10", features = ["tokio"] }
1616
tracing-opentelemetry = "0.10"
1717

1818
[features]
19-
default = ["backup-enable"]
19+
default = ["std", "backup-enable", "verify-mr-enclave-enable"]
20+
std = [
21+
"anonify-eth-driver/std",
22+
]
2023
backup-enable = [
2124
"state-runtime-node-server/backup-enable",
2225
"anonify-eth-driver/backup-enable",
2326
]
27+
verify-mr-enclave-enable = [
28+
"state-runtime-node-server/verify-mr-enclave-enable",
29+
"anonify-eth-driver/verify-mr-enclave-enable",
30+
]

example/key-vault/enclave/Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ crate-type = ["staticlib"]
1010

1111
[dependencies]
1212
frame-config = { path = "../../../frame/config", default-features = false, features = ["sgx"] }
13-
frame-enclave = { path = "../../../frame/enclave" }
13+
frame-enclave = { path = "../../../frame/enclave", default-features = false }
1414
frame-types = { path = "../../../frame/types" }
15-
key-vault-enclave = { path = "../../../modules/key-vault-enclave" }
15+
key-vault-enclave = { path = "../../../modules/key-vault-enclave", default-features = false }
1616
key-vault-ecall-types = { path = "../../../modules/key-vault-ecall-types", default-features = false, features = ["sgx"] }
1717
sgx_tstd = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git"}
1818
anyhow = { rev = "sgx_1.1.3", git = "https://github.com/mesalock-linux/anyhow-sgx.git" }
@@ -22,5 +22,9 @@ env_logger = { git = "https://github.com/mesalock-linux/env_logger-sgx", default
2222
log = { git = "https://github.com/mesalock-linux/log-sgx" }
2323

2424
[features]
25-
default = []
26-
runtime_enabled = []
25+
default = ["verify-mr-enclave-enable"]
26+
runtime_enabled = []
27+
verify-mr-enclave-enable = [
28+
"frame-enclave/verify-mr-enclave-enable",
29+
"key-vault-enclave/verify-mr-enclave-enable",
30+
]

example/key-vault/server/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ failure = "0.1"
1313
tracing-subscriber = "0.2"
1414

1515
[features]
16-
default = ["backup-enable"]
16+
default = ["std", "backup-enable", "verify-mr-enclave-enable"]
17+
std = [
18+
"anonify-eth-driver/std",
19+
]
1720
backup-enable = [
1821
"anonify-eth-driver/backup-enable",
1922
]
23+
verify-mr-enclave-enable = [
24+
"anonify-eth-driver/verify-mr-enclave-enable",
25+
]

frame/enclave/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ thiserror = { git = "https://github.com/mesalock-linux/thiserror-sgx.git" }
1616
sgx_types = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
1717
env_logger = { git = "https://github.com/mesalock-linux/env_logger-sgx", default-features = false, features = ["mesalock_sgx"] }
1818
log = { git = "https://github.com/mesalock-linux/log-sgx" }
19+
20+
[features]
21+
default = ["verify-mr-enclave-enable"]
22+
verify-mr-enclave-enable = [
23+
"frame-runtime/verify-mr-enclave-enable",
24+
]

frame/runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ frame-common = { path = "../common", default-features = false }
99
remote-attestation = { path = "../remote-attestation", default-features = false, optional = true }
1010
frame-types = { path = "../types" }
1111
frame-treekem = { path = "../treekem", default-features = false, optional = true }
12-
frame-mra-tls = { path = "../mra-tls", optional = true }
12+
frame-mra-tls = { path = "../mra-tls", default-features = false, optional = true }
1313
frame-sodium = { path = "../sodium", default-features = false, optional = true }
1414
sgx_tstd = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true }
1515
anyhow-std = { version = "1.0", package = "anyhow", optional = true }

frame/treekem/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
[dependencies]
88
frame-config = { path = "../config", default-features = false, features = ["sgx"] }
99
frame-common = { path = "../common", default-features = false, features = ["sgx"] }
10-
frame-mra-tls = { path = "../../frame/mra-tls" }
10+
frame-mra-tls = { path = "../../frame/mra-tls", default-features = false }
1111
test-utils = { path = "../../tests/utils", default-features = false, features = ["sgx"] }
1212
hex = { version = "0.4", default-features = false }
1313
anyhow = { rev = "sgx_1.1.3", git = "https://github.com/mesalock-linux/anyhow-sgx.git" }
@@ -28,4 +28,6 @@ base64 = { rev = "sgx_1.1.3", git = "https://github.com/mesalock-linux/rust-base
2828
[features]
2929
default = ["backup-enable", "verify-mr-enclave-enable"]
3030
backup-enable = []
31-
verify-mr-enclave-enable = []
31+
verify-mr-enclave-enable = [
32+
"frame-mra-tls/verify-mr-enclave-enable",
33+
]

modules/anonify-ecall-types/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ bincode-std = { package = "bincode", version = "1.3", optional = true }
2121
bincode-sgx = { package = "bincode", git = "https://github.com/mesalock-linux/bincode-sgx", optional = true }
2222

2323
[features]
24-
default = ["std"]
24+
default = ["std", "verify-mr-enclave-enable"]
2525
std = [
2626
"frame-common/std",
2727
"frame-runtime/std",
@@ -41,3 +41,6 @@ sgx = [
4141
"serde_bytes_sgx",
4242
"bincode-sgx",
4343
]
44+
verify-mr-enclave-enable = [
45+
"frame-runtime/verify-mr-enclave-enable",
46+
]

modules/anonify-enclave/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2018"
66

77
[dependencies]
88
frame-types = { path = "../../frame/types" }
9-
frame-enclave = { path = "../../frame/enclave" }
9+
frame-enclave = { path = "../../frame/enclave", default-features = false }
1010
frame-config = { path = "../../frame/config", default-features = false, features = ["sgx"] }
1111
frame-runtime = { path = "../../frame/runtime", default-features = false, features = ["sgx"] }
1212
frame-treekem = { path = "../../frame/treekem", default-features = false }
@@ -35,5 +35,9 @@ backup-enable = [
3535
"frame-treekem/backup-enable",
3636
]
3737
verify-mr-enclave-enable = [
38+
"frame-enclave/verify-mr-enclave-enable",
39+
"frame-runtime/verify-mr-enclave-enable",
40+
"frame-treekem/verify-mr-enclave-enable",
3841
"frame-mra-tls/verify-mr-enclave-enable",
42+
"anonify-ecall-types/verify-mr-enclave-enable",
3943
]

0 commit comments

Comments
 (0)