From bb043a8a30414603e925dd330a874d72d1e77959 Mon Sep 17 00:00:00 2001 From: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Date: Thu, 12 Dec 2019 18:15:09 +0800 Subject: [PATCH 1/2] Problem: outdated Intel SGX SDK (CRO-626) Solution: as the Rust SGX SDK isn't yet officially released (and may take some time), the code was ported to use the 1.1.0-beta that is based on the latest Intel SGX SDK. (crate dependencies were temporarily put into a sgx-vendor repository with the updated Rust SGX SDK deps.) TODO: port to the 1.1.0 release when it happens (note some changes may be needed for secrets handling) --- Cargo.lock | 164 +++++++++------- chain-abci/Cargo.toml | 2 +- chain-core/Cargo.toml | 4 +- chain-tx-enclave/enclave-t-common/Cargo.toml | 8 +- chain-tx-enclave/enclave-u-common/Cargo.toml | 4 +- chain-tx-enclave/rust-sgx-sdk/buildenv.mk | 41 ++-- .../rust-sgx-sdk/common/inc/assert.h | 4 +- .../rust-sgx-sdk/common/inc/complex.h | 14 +- .../rust-sgx-sdk/common/inc/ctype.h | 2 +- .../rust-sgx-sdk/common/inc/dirent.h | 12 +- .../rust-sgx-sdk/common/inc/endian.h | 2 +- .../rust-sgx-sdk/common/inc/errno.h | 6 +- .../rust-sgx-sdk/common/inc/float.h | 4 +- .../rust-sgx-sdk/common/inc/iso646.h | 4 +- .../rust-sgx-sdk/common/inc/limits.h | 6 +- .../rust-sgx-sdk/common/inc/math.h | 4 +- .../rust-sgx-sdk/common/inc/mbusafecrt.h | 4 +- .../rust-sgx-sdk/common/inc/netdb.h | 37 ++++ .../rust-sgx-sdk/common/inc/poll.h | 6 +- .../rust-sgx-sdk/common/inc/pthread.h | 34 ++++ .../rust-sgx-sdk/common/inc/pwd.h | 36 ++++ .../rust-sgx-sdk/common/inc/setjmp.h | 4 +- .../rust-sgx-sdk/common/inc/stdarg.h | 6 +- .../rust-sgx-sdk/common/inc/stdbool.h | 2 +- .../rust-sgx-sdk/common/inc/stddef.h | 6 +- .../rust-sgx-sdk/common/inc/stdint.h | 4 +- .../rust-sgx-sdk/common/inc/stdio.h | 6 +- .../rust-sgx-sdk/common/inc/stdlib.h | 6 +- .../rust-sgx-sdk/common/inc/string.h | 6 +- .../rust-sgx-sdk/common/inc/sys/_types.h | 40 ++-- .../rust-sgx-sdk/common/inc/sys/cdefs.h | 14 +- .../rust-sgx-sdk/common/inc/sys/endian.h | 2 +- .../rust-sgx-sdk/common/inc/sys/epoll.h | 18 +- .../rust-sgx-sdk/common/inc/sys/ieee.h | 20 +- .../rust-sgx-sdk/common/inc/sys/sockaddr.h | 8 +- .../rust-sgx-sdk/common/inc/sys/socket.h | 22 +-- .../rust-sgx-sdk/common/inc/sys/stat.h | 184 +++++++++--------- .../rust-sgx-sdk/common/inc/sys/stdint.h | 2 +- .../common/inc/sys/struct_timespec.h | 4 +- .../rust-sgx-sdk/common/inc/sys/types.h | 6 +- .../rust-sgx-sdk/common/inc/sys/uio.h | 6 +- .../rust-sgx-sdk/common/inc/time.h | 6 +- .../rust-sgx-sdk/common/inc/unistd.h | 6 +- .../rust-sgx-sdk/common/inc/wchar.h | 4 +- .../rust-sgx-sdk/common/inc/wctype.h | 6 +- .../rust-sgx-sdk/compiler-rt/Makefile | 40 ++-- .../rust-sgx-sdk/edl/inc/dirent.h | 41 ++-- chain-tx-enclave/rust-sgx-sdk/edl/inc/stat.h | 43 ++-- .../rust-sgx-sdk/edl/sgx_asyncio.edl | 48 ++--- .../rust-sgx-sdk/edl/sgx_backtrace.edl | 50 ++--- chain-tx-enclave/rust-sgx-sdk/edl/sgx_env.edl | 56 +++--- chain-tx-enclave/rust-sgx-sdk/edl/sgx_fd.edl | 50 ++--- .../rust-sgx-sdk/edl/sgx_file.edl | 52 ++--- chain-tx-enclave/rust-sgx-sdk/edl/sgx_fs.edl | 48 ++--- chain-tx-enclave/rust-sgx-sdk/edl/sgx_mem.edl | 50 ++--- chain-tx-enclave/rust-sgx-sdk/edl/sgx_net.edl | 55 +++--- .../rust-sgx-sdk/edl/sgx_net_switchless.edl | 48 ++--- .../rust-sgx-sdk/edl/sgx_pipe.edl | 50 ++--- .../rust-sgx-sdk/edl/sgx_socket.edl | 48 ++--- .../rust-sgx-sdk/edl/sgx_stdio.edl | 52 ++--- chain-tx-enclave/rust-sgx-sdk/edl/sgx_sys.edl | 51 ++--- .../rust-sgx-sdk/edl/sgx_thread.edl | 33 ++++ .../rust-sgx-sdk/edl/sgx_time.edl | 50 ++--- .../rust-sgx-sdk/edl/sgx_tstd.edl | 54 ++--- chain-tx-enclave/rust-sgx-sdk/version | 2 +- chain-tx-enclave/tx-query/Dockerfile | 2 +- chain-tx-enclave/tx-query/Makefile | 2 +- chain-tx-enclave/tx-query/app/Cargo.toml | 6 +- chain-tx-enclave/tx-query/app/src/main.rs | 2 - chain-tx-enclave/tx-query/enclave/Cargo.toml | 28 +-- chain-tx-enclave/tx-validation/Dockerfile | 2 +- chain-tx-enclave/tx-validation/Makefile | 2 +- chain-tx-enclave/tx-validation/app/Cargo.toml | 6 +- .../tx-validation/enclave/Cargo.toml | 16 +- .../tx-validation/enclave/src/validate.rs | 2 +- chain-tx-filter/Cargo.toml | 4 +- chain-tx-validation/Cargo.toml | 4 +- ci-scripts/Dockerfile | 2 +- client-common/Cargo.toml | 2 +- client-core/Cargo.toml | 2 +- client-network/Cargo.toml | 4 +- enclave-protocol/Cargo.toml | 4 +- test-common/Cargo.toml | 2 +- 83 files changed, 860 insertions(+), 939 deletions(-) create mode 100644 chain-tx-enclave/rust-sgx-sdk/common/inc/netdb.h create mode 100644 chain-tx-enclave/rust-sgx-sdk/common/inc/pthread.h create mode 100644 chain-tx-enclave/rust-sgx-sdk/common/inc/pwd.h create mode 100644 chain-tx-enclave/rust-sgx-sdk/edl/sgx_thread.edl diff --git a/Cargo.lock b/Cargo.lock index a4671d6f8..5962ce3c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,10 +172,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bincode" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -374,7 +373,7 @@ dependencies = [ "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", @@ -398,10 +397,10 @@ dependencies = [ "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "sgx_tstd 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "sgx_tstd 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -418,8 +417,8 @@ dependencies = [ "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", - "sgx_tstd 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", + "sgx_tstd 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] @@ -428,8 +427,8 @@ version = "0.1.0" dependencies = [ "chain-core 0.1.0", "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", - "sgx_tstd 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", + "sgx_tstd 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] @@ -524,7 +523,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", "secstr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", @@ -559,7 +558,7 @@ dependencies = [ "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", "ripemd160 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", "secstr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", @@ -587,7 +586,7 @@ dependencies = [ "client-core 0.1.0", "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", "secstr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "tendermint 0.10.0 (git+https://github.com/crypto-com/tendermint-rs.git?rev=8e95731ee671777638ab2a3d5dfd7b35992b86aa)", ] @@ -858,8 +857,8 @@ dependencies = [ "chain-core 0.1.0", "chain-tx-validation 0.1.0", "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", - "sgx_tstd 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", + "sgx_tstd 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] @@ -2403,12 +2402,12 @@ dependencies = [ [[package]] name = "secp256k1zkp" version = "0.13.0" -source = "git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd#8b9a38b870a7759fcdbd4a5d435b5ba873c70afd" +source = "git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f#be445f29a96af31fe079611d26c07f1f596d1c5f" dependencies = [ "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "sgx_tstd 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "sgx_tstd 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", "zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2491,85 +2490,109 @@ dependencies = [ [[package]] name = "sgx_alloc" -version = "1.0.9" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" -dependencies = [ - "sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", -] +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" [[package]] name = "sgx_backtrace_sys" -version = "1.0.9" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" dependencies = [ "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_libc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_libc 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] name = "sgx_build_helper" version = "0.1.0" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" [[package]] name = "sgx_demangle" -version = "1.0.9" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" [[package]] name = "sgx_libc" -version = "1.0.9" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" dependencies = [ - "sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "sgx_types 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", +] + +[[package]] +name = "sgx_tcrypto" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" +dependencies = [ + "sgx_types 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] name = "sgx_tprotected_fs" -version = "1.0.9" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" dependencies = [ - "sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "sgx_trts 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_types 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] name = "sgx_trts" -version = "1.0.9" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" +dependencies = [ + "sgx_libc 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_types 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", +] + +[[package]] +name = "sgx_tse" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" +dependencies = [ + "sgx_types 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", +] + +[[package]] +name = "sgx_tseal" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" dependencies = [ - "sgx_libc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "sgx_tcrypto 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_trts 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_tse 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_types 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] name = "sgx_tstd" -version = "1.0.9" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" dependencies = [ - "sgx_alloc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_backtrace_sys 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_demangle 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_libc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_tprotected_fs 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_unwind 0.0.1 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "sgx_alloc 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_backtrace_sys 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_demangle 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_libc 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_tprotected_fs 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_trts 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_tseal 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_types 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", + "sgx_unwind 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] name = "sgx_types" -version = "1.0.9" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +version = "1.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" [[package]] name = "sgx_unwind" -version = "0.0.1" -source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9#2042ce64fd377e790584c96a4bfd4c32de2d03ea" +version = "0.1.0" +source = "git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168#5b5e512abbbfc3030e8cb274989fb372b685b168" dependencies = [ - "sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", - "sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)", + "sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)", ] [[package]] @@ -2658,7 +2681,7 @@ name = "sled" version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2921,7 +2944,7 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)", + "secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)", "secstr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3625,7 +3648,7 @@ dependencies = [ "checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bech32 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0089c35ab7c6f2bc55ab23f769913f0ac65b1023e7e74638a1f43128dd5df2" -"checksum bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ab639324e3ee8774d296864fbc0dbbb256cf1a41c490b94cba90c082915f92" +"checksum bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" "checksum bindgen 0.49.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4c07087f3d5731bf3fb375a81841b99597e25dc11bd3bc72d16d43adf6624a6e" "checksum bit-vec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a4523a10839ffae575fb08aa3423026c8cb4687eef43952afb956229d4f246f7" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" @@ -3849,7 +3872,7 @@ dependencies = [ "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" -"checksum secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=8b9a38b870a7759fcdbd4a5d435b5ba873c70afd)" = "" +"checksum secp256k1zkp 0.13.0 (git+https://github.com/crypto-com/rust-secp256k1-zkp.git?rev=be445f29a96af31fe079611d26c07f1f596d1c5f)" = "" "checksum secstr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fb003d53cef244a97516226b01155057c7fa6eb52914933c32f6c98a84182188" "checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" "checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" @@ -3859,16 +3882,19 @@ dependencies = [ "checksum serde_bytes 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "325a073952621257820e7a3469f55ba4726d8b28657e7e36653d1c36dc2c84ae" "checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" "checksum serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)" = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7" -"checksum sgx_alloc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_backtrace_sys 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_demangle 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_libc 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_tprotected_fs 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_trts 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_tstd 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_types 1.0.9 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" -"checksum sgx_unwind 0.0.1 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=v1.0.9)" = "" +"checksum sgx_alloc 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_backtrace_sys 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_build_helper 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_demangle 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_libc 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_tcrypto 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_tprotected_fs 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_trts 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_tse 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_tseal 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_tstd 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_types 1.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" +"checksum sgx_unwind 0.1.0 (git+https://github.com/baidu/rust-sgx-sdk.git?rev=5b5e512abbbfc3030e8cb274989fb372b685b168)" = "" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" diff --git a/chain-abci/Cargo.toml b/chain-abci/Cargo.toml index 4c57f044d..b7c28c9b0 100644 --- a/chain-abci/Cargo.toml +++ b/chain-abci/Cargo.toml @@ -32,7 +32,7 @@ hex = "0.4" protobuf = "2.7.0" integer-encoding = "1.0.7" structopt = "0.3" -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism"] } blake2 = "0.8" parity-scale-codec = { features = ["derive"], version = "1.1" } zmq = "0.9" diff --git a/chain-core/Cargo.toml b/chain-core/Cargo.toml index d9c3a88c0..9346a2c0a 100644 --- a/chain-core/Cargo.toml +++ b/chain-core/Cargo.toml @@ -16,12 +16,12 @@ digest = { version = "0.8", default-features = false} tiny-keccak = { version = "2.0", features = ["keccak"] } sha2 = { version = "0.8", default-features = false } hex = { version = "0.4", optional = true } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism"] } serde = { version = "1.0", features = ["derive"], optional = true } blake2 = { version = "0.8", default-features = false } parity-scale-codec = { features = ["derive"], default-features = false, version = "1.1" } base64 = { version = "0.11", optional = true } -sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true } +sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true } static_assertions = { version = "1.1.0", default-features = false} bech32 = { version = "0.7.1", optional = true } aead = "0.2" diff --git a/chain-tx-enclave/enclave-t-common/Cargo.toml b/chain-tx-enclave/enclave-t-common/Cargo.toml index 7b4893dfe..d4f53980f 100644 --- a/chain-tx-enclave/enclave-t-common/Cargo.toml +++ b/chain-tx-enclave/enclave-t-common/Cargo.toml @@ -7,10 +7,10 @@ readme = "../../README.md" edition = "2018" [dependencies] -sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git" } +sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git" } chain-core = { path = "../../chain-core", default-features = false, features = ["mesalock_sgx"] } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism", "sgx"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism", "sgx"] } zeroize = { version = "1.0", default-features = false } -sgx_tseal = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_tseal = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } parity-scale-codec = { default-features = false, version = "1.0" } -sgx_types = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git" } +sgx_types = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git" } diff --git a/chain-tx-enclave/enclave-u-common/Cargo.toml b/chain-tx-enclave/enclave-u-common/Cargo.toml index 9686b4cc0..b09bfa066 100644 --- a/chain-tx-enclave/enclave-u-common/Cargo.toml +++ b/chain-tx-enclave/enclave-u-common/Cargo.toml @@ -10,5 +10,5 @@ edition = "2018" hex = "0.3" log = "0.4.0" env_logger = "0.7.0" -sgx_types = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } -sgx_urts = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } \ No newline at end of file +sgx_types = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_urts = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } \ No newline at end of file diff --git a/chain-tx-enclave/rust-sgx-sdk/buildenv.mk b/chain-tx-enclave/rust-sgx-sdk/buildenv.mk index 3482ae162..6c9a7b6a1 100644 --- a/chain-tx-enclave/rust-sgx-sdk/buildenv.mk +++ b/chain-tx-enclave/rust-sgx-sdk/buildenv.mk @@ -1,31 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at # -# Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. +# http://www.apache.org/licenses/LICENSE-2.0 # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Baidu, Inc., nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License.. # # @@ -127,3 +115,4 @@ ENCLAVE_LDFLAGS = -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ -Wl,--gc-sections \ -Wl,--defsym,__ImageBase=0 + diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/assert.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/assert.h index 82489e80c..a15399541 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/assert.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/assert.h @@ -1,5 +1,5 @@ -/* $OpenBSD: assert.h,v 1.12 2006/01/31 10:53:51 hshoexer Exp $ */ -/* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */ +/* $OpenBSD: assert.h,v 1.12 2006/01/31 10:53:51 hshoexer Exp $ */ +/* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */ /*- * Copyright (c) 1992, 1993 diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/complex.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/complex.h index 93fe495dc..904cb31fb 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/complex.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/complex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: complex.h,v 1.3 2010/07/24 22:17:03 guenther Exp $ */ +/* $OpenBSD: complex.h,v 1.3 2010/07/24 22:17:03 guenther Exp $ */ /* * Copyright (c) 2008 Martynas Venckus * @@ -16,7 +16,7 @@ */ #ifndef _COMPLEX_H_ -#define _COMPLEX_H_ +#define _COMPLEX_H_ #include @@ -25,18 +25,18 @@ */ #ifdef __GNUC__ #if __STDC_VERSION__ < 199901 -#define _Complex __complex__ +#define _Complex __complex__ #endif -#define _Complex_I 1.0fi +#define _Complex_I 1.0fi #elif defined(lint) -#define _Complex_I 1.0fi +#define _Complex_I 1.0fi #endif -#define complex _Complex +#define complex _Complex /* XXX switch to _Imaginary_I */ #undef I -#define I _Complex_I +#define I _Complex_I __BEGIN_DECLS /* diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/ctype.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/ctype.h index 140844705..4449d74d0 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/ctype.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/ctype.h @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ctype.h 5.3 (Berkeley) 4/3/91 + * @(#)ctype.h 5.3 (Berkeley) 4/3/91 */ #ifndef _CTYPE_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/dirent.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/dirent.h index b3b85e858..49d612ae2 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/dirent.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/dirent.h @@ -29,7 +29,7 @@ struct dirent #endif unsigned short int d_reclen; unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ + char d_name[256]; /* We must not include limits.h! */ }; //#ifdef __USE_LARGEFILE64 @@ -39,11 +39,11 @@ struct dirent64 __off64_t d_off; unsigned short int d_reclen; unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ + char d_name[256]; /* We must not include limits.h! */ }; //#endif -#define d_fileno d_ino /* Backwards compatibility. */ +#define d_fileno d_ino /* Backwards compatibility. */ #undef _DIRENT_HAVE_D_NAMLEN #define _DIRENT_HAVE_D_RECLEN @@ -52,8 +52,8 @@ struct dirent64 #if defined __OFF_T_MATCHES_OFF64_T && defined __INO_T_MATCHES_INO64_T /* Inform libc code that these two types are effectively identical. */ -# define _DIRENT_MATCHES_DIRENT64 1 +# define _DIRENT_MATCHES_DIRENT64 1 #else -# define _DIRENT_MATCHES_DIRENT64 0 +# define _DIRENT_MATCHES_DIRENT64 0 +#endif #endif -#endif \ No newline at end of file diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/endian.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/endian.h index fcd74c9a1..2620c5898 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/endian.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */ +/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/errno.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/errno.h index 0924d5ac4..dbe293cb9 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/errno.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/errno.h @@ -1,4 +1,4 @@ -/* $OpenBSD: errno.h,v 1.1 2005/12/28 16:33:56 millert Exp $ */ +/* $OpenBSD: errno.h,v 1.1 2005/12/28 16:33:56 millert Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)errno.h 8.5 (Berkeley) 1/21/94 + * @(#)errno.h 8.5 (Berkeley) 1/21/94 */ #ifndef _ERRNO_H_ @@ -180,7 +180,7 @@ __BEGIN_DECLS #ifndef errno int * _TLIBC_CDECL_ __errno(void); -#define errno (*__errno()) +#define errno (*__errno()) #endif /* errno */ __END_DECLS diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/float.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/float.h index 5ca839a9b..e38a7c6a9 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/float.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/float.h @@ -1,5 +1,5 @@ -/* $OpenBSD: float.h,v 1.3 2008/07/21 20:50:54 martynas Exp $ */ -/* $NetBSD: float.h,v 1.8 1995/06/20 20:45:37 jtc Exp $ */ +/* $OpenBSD: float.h,v 1.3 2008/07/21 20:50:54 martynas Exp $ */ +/* $NetBSD: float.h,v 1.8 1995/06/20 20:45:37 jtc Exp $ */ /* * Copyright (c) 1989 Regents of the University of California. diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/iso646.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/iso646.h index 83feb52e3..a0c341b65 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/iso646.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/iso646.h @@ -1,5 +1,5 @@ -/* $OpenBSD: iso646.h,v 1.3 2001/10/11 00:05:21 espie Exp $ */ -/* $NetBSD: iso646.h,v 1.1 1995/02/17 09:08:10 jtc Exp $ */ +/* $OpenBSD: iso646.h,v 1.3 2001/10/11 00:05:21 espie Exp $ */ +/* $NetBSD: iso646.h,v 1.1 1995/02/17 09:08:10 jtc Exp $ */ /* * Written by J.T. Conklin 02/16/95. diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/limits.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/limits.h index fab59c9b8..9d42cb545 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/limits.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/limits.h @@ -1,5 +1,5 @@ -/* $OpenBSD: limits.h,v 1.15 2008/02/10 09:59:54 kettenis Exp $ */ -/* $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ */ +/* $OpenBSD: limits.h,v 1.15 2008/02/10 09:59:54 kettenis Exp $ */ +/* $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)limits.h 5.9 (Berkeley) 4/3/91 + * @(#)limits.h 5.9 (Berkeley) 4/3/91 */ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/math.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/math.h index 749f935ab..6ea425b84 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/math.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/math.h @@ -1,4 +1,4 @@ -/* $OpenBSD: math.h,v 1.27 2010/12/14 11:16:15 martynas Exp $ */ +/* $OpenBSD: math.h,v 1.27 2010/12/14 11:16:15 martynas Exp $ */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -145,7 +145,7 @@ double _TLIBC_CDECL_ tgamma(double); double _TLIBC_CDECL_ nearbyint(double); double _TLIBC_CDECL_ rint(double); -long int _TLIBC_CDECL_ lrint(double); +long int _TLIBC_CDECL_ lrint(double); long long int _TLIBC_CDECL_ llrint(double); double _TLIBC_CDECL_ round(double); long int _TLIBC_CDECL_ lround(double); diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/mbusafecrt.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/mbusafecrt.h index 466c55041..3bdfe7ae2 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/mbusafecrt.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/mbusafecrt.h @@ -1,6 +1,6 @@ // // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. // /*** @@ -80,4 +80,4 @@ extern errno_t memmove_s( void * dst, size_t sizeInBytes, const void * src, size } #endif -#endif /* MBUSAFECRT_H */ +#endif /* MBUSAFECRT_H */ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/netdb.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/netdb.h new file mode 100644 index 000000000..5b39fcee2 --- /dev/null +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/netdb.h @@ -0,0 +1,37 @@ + /* Copyright (C) 1996-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* All data returned by the network data base library are supplied in + host order and returned in network order (suitable for use in + system calls). */ + +#ifndef _NETDB_H +#define _NETDB_H + +struct addrinfo +{ + int ai_flags; /* Input flags. */ + int ai_family; /* Protocol family for socket. */ + int ai_socktype; /* Socket type. */ + int ai_protocol; /* Protocol for socket. */ + socklen_t ai_addrlen; /* Length of socket address. */ + struct sockaddr *ai_addr; /* Socket address for socket. */ + char *ai_canonname; /* Canonical name for service location. */ + struct addrinfo *ai_next; /* Pointer to next in list. */ +}; + +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/poll.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/poll.h index 35815a907..1a070e070 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/poll.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/poll.h @@ -7,9 +7,9 @@ typedef unsigned long int nfds_t; /* Data structure describing a polling request. */ struct pollfd { - int fd; /* File descriptor to poll. */ - short int events; /* Types of events poller cares about. */ - short int revents; /* Types of events that actually occurred. */ + int fd; /* File descriptor to poll. */ + short int events; /* Types of events poller cares about. */ + short int revents; /* Types of events that actually occurred. */ }; #endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/pthread.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/pthread.h new file mode 100644 index 000000000..e79668ffd --- /dev/null +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/pthread.h @@ -0,0 +1,34 @@ +#ifndef _SYS_THREAD_H_ +#define _SYS_THREAD_H_ + +/* Thread identifiers. The structure of the attribute type is not + exposed on purpose. */ +typedef unsigned long int pthread_t; + +#if defined __x86_64__ && !defined __ILP32__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#endif + +#ifdef __x86_64__ +# if __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# else +# define __SIZEOF_PTHREAD_ATTR_T 32 +#endif + +union pthread_attr_t +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif + +#endif +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/pwd.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/pwd.h new file mode 100644 index 000000000..fc947d842 --- /dev/null +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/pwd.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1991-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* + * POSIX Standard: 9.2.2 User Database Access + */ + +#ifndef _PWD_H +#define _PWD_H + +struct passwd +{ + char *pw_name; /* Username. */ + char *pw_passwd; /* Password. */ + __uid_t pw_uid; /* User ID. */ + __gid_t pw_gid; /* Group ID. */ + char *pw_gecos; /* Real name. */ + char *pw_dir; /* Home directory. */ + char *pw_shell; /* Shell program. */ +}; + +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/setjmp.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/setjmp.h index 6954e2b2f..752f0cf76 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/setjmp.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/setjmp.h @@ -1,4 +1,4 @@ -/* $NetBSD: setjmp.h,v 1.26 2011/11/05 09:27:06 joerg Exp $ */ +/* $NetBSD: setjmp.h,v 1.26 2011/11/05 09:27:06 joerg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)setjmp.h 8.2 (Berkeley) 1/21/94 + * @(#)setjmp.h 8.2 (Berkeley) 1/21/94 */ #ifndef _SETJMP_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdarg.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdarg.h index ed73e246a..b2a5d36e8 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdarg.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdarg.h @@ -1,5 +1,5 @@ -/* $OpenBSD: stdarg.h,v 1.14 2010/12/30 05:01:36 tedu Exp $ */ -/* $NetBSD: stdarg.h,v 1.12 1995/12/25 23:15:31 mycroft Exp $ */ +/* $OpenBSD: stdarg.h,v 1.14 2010/12/30 05:01:36 tedu Exp $ */ +/* $NetBSD: stdarg.h,v 1.12 1995/12/25 23:15:31 mycroft Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 + * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 */ #ifndef _STDARG_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdbool.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdbool.h index bd1837ec4..86b866d5d 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdbool.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdbool.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdbool.h,v 1.5 2010/07/24 22:17:03 guenther Exp $ */ +/* $OpenBSD: stdbool.h,v 1.5 2010/07/24 22:17:03 guenther Exp $ */ /* * Written by Marc Espie, September 25, 1999 diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/stddef.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/stddef.h index 84509c502..c1328824c 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/stddef.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/stddef.h @@ -1,5 +1,5 @@ -/* $OpenBSD: stddef.h,v 1.10 2009/09/22 21:40:02 jsg Exp $ */ -/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ +/* $OpenBSD: stddef.h,v 1.10 2009/09/22 21:40:02 jsg Exp $ */ +/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)stddef.h 5.5 (Berkeley) 4/3/91 + * @(#)stddef.h 5.5 (Berkeley) 4/3/91 */ #ifndef _STDDEF_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdint.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdint.h index d283ae921..e57448406 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdint.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdint.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdint.h,v 1.4 2006/12/10 22:17:55 deraadt Exp $ */ +/* $OpenBSD: stdint.h,v 1.4 2006/12/10 22:17:55 deraadt Exp $ */ /* * Copyright (c) 1997, 2005 Todd C. Miller @@ -16,7 +16,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef _STDINT_H_ +#ifndef _STDINT_H_ #define _STDINT_H_ #include diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdio.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdio.h index 0175a3ace..92d01a0d9 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdio.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdio.h @@ -1,5 +1,5 @@ -/* $OpenBSD: stdio.h,v 1.38 2009/11/09 00:18:27 kurt Exp $ */ -/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ +/* $OpenBSD: stdio.h,v 1.38 2009/11/09 00:18:27 kurt Exp $ */ +/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)stdio.h 5.17 (Berkeley) 6/3/91 + * @(#)stdio.h 5.17 (Berkeley) 6/3/91 */ #ifndef _STDIO_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdlib.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdlib.h index f32173853..e5b636534 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/stdlib.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/stdlib.h @@ -1,5 +1,5 @@ -/* $OpenBSD: stdlib.h,v 1.47 2010/05/18 22:24:55 tedu Exp $ */ -/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */ +/* $OpenBSD: stdlib.h,v 1.47 2010/05/18 22:24:55 tedu Exp $ */ +/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * -* @(#)stdlib.h 5.13 (Berkeley) 6/4/91 +* @(#)stdlib.h 5.13 (Berkeley) 6/4/91 */ #ifndef _STDLIB_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/string.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/string.h index 86d3cd264..0cc7206eb 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/string.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/string.h @@ -1,5 +1,5 @@ -/* $OpenBSD: string.h,v 1.20 2010/09/24 13:33:00 matthew Exp $ */ -/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */ +/* $OpenBSD: string.h,v 1.20 2010/09/24 13:33:00 matthew Exp $ */ +/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)string.h 5.10 (Berkeley) 3/9/91 + * @(#)string.h 5.10 (Berkeley) 3/9/91 */ #ifndef _STRING_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/_types.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/_types.h index fc9f153fe..7768f181d 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/_types.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/_types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: _types.h,v 1.2 2008/03/16 19:42:57 otto Exp $ */ +/* $OpenBSD: _types.h,v 1.2 2008/03/16 19:42:57 otto Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)types.h 8.3 (Berkeley) 1/5/94 + * @(#)types.h 8.3 (Berkeley) 1/5/94 */ #ifndef _SYS__TYPES_H_ @@ -83,9 +83,9 @@ typedef __uint64_t __uint_fast64_t; typedef long __off_t; #ifdef __x86_64__ -typedef long int __off64_t; +typedef long int __off64_t; #else -typedef long long int __off64_t; +typedef long long int __off64_t; #endif /* 7.18.1.4 Integer types capable of holding object pointers */ @@ -138,25 +138,25 @@ typedef __int64_t __intmax_t; typedef __uint64_t __uintmax_t; -typedef unsigned long int __ino_t; -typedef unsigned int __mode_t; -typedef unsigned int __uid_t; -typedef unsigned int __gid_t; -typedef long int __blksize_t; -typedef long int __blkcnt_t; +typedef unsigned long int __ino_t; +typedef unsigned int __mode_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef long int __blksize_t; +typedef long int __blkcnt_t; #ifdef __x86_64__ -typedef unsigned long int __dev_t; -typedef long int __off64_t; -typedef unsigned long int __nlink_t; -typedef long int __blkcnt64_t; -typedef unsigned long int __ino64_t; +typedef unsigned long int __dev_t; +typedef long int __off64_t; +typedef unsigned long int __nlink_t; +typedef long int __blkcnt64_t; +typedef unsigned long int __ino64_t; #else -typedef unsigned long long int __dev_t; -typedef long long int __off64_t; -typedef unsigned int __nlink_t; -typedef long long int __blkcnt64_t; -typedef unsigned long long int __ino64_t; +typedef unsigned long long int __dev_t; +typedef long long int __off64_t; +typedef unsigned int __nlink_t; +typedef long long int __blkcnt64_t; +typedef unsigned long long int __ino64_t; #endif typedef unsigned int __socklen_t; diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/cdefs.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/cdefs.h index a6fdb585b..71c3c1ce2 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/cdefs.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/cdefs.h @@ -1,5 +1,5 @@ -/* $OpenBSD: cdefs.h,v 1.34 2012/08/14 20:11:37 matthew Exp $ */ -/* $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ */ +/* $OpenBSD: cdefs.h,v 1.34 2012/08/14 20:11:37 matthew Exp $ */ +/* $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ */ /* * Copyright (c) 1991, 1993 @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)cdefs.h 8.7 (Berkeley) 1/21/94 + * @(#)cdefs.h 8.7 (Berkeley) 1/21/94 */ #ifndef _SYS_CDEFS_H_ @@ -122,11 +122,11 @@ * larger code. */ #if defined(__GNUC__) && __GNUC_PREREQ__(2, 96) -#define __predict_true(exp) __builtin_expect(((exp) != 0), 1) -#define __predict_false(exp) __builtin_expect(((exp) != 0), 0) +#define __predict_true(exp) __builtin_expect(((exp) != 0), 1) +#define __predict_false(exp) __builtin_expect(((exp) != 0), 0) #else -#define __predict_true(exp) ((exp) != 0) -#define __predict_false(exp) ((exp) != 0) +#define __predict_true(exp) ((exp) != 0) +#define __predict_false(exp) ((exp) != 0) #endif #endif /* !_SYS_CDEFS_H_ */ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/endian.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/endian.h index 29edd81c5..1cd7b810c 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/endian.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */ +/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/epoll.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/epoll.h index f464db4ae..c07830dcb 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/epoll.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/epoll.h @@ -15,23 +15,23 @@ License along with the GNU C Library; if not, see . */ -#ifndef _SYS_EPOLL_H -#define _SYS_EPOLL_H +#ifndef _SYS_EPOLL_H +#define _SYS_EPOLL_H #define __EPOLL_PACKED __attribute__ ((__packed__)) typedef union epoll_data { - void *ptr; - int fd; - uint32_t u32; - uint64_t u64; + void *ptr; + int fd; + uint32_t u32; + uint64_t u64; } epoll_data_t; struct epoll_event { - uint32_t events; /* Epoll events */ - epoll_data_t data; /* User data variable */ + uint32_t events; /* Epoll events */ + epoll_data_t data; /* User data variable */ } __EPOLL_PACKED; -#endif \ No newline at end of file +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/ieee.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/ieee.h index 8370cd829..eab3b9757 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/ieee.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/ieee.h @@ -1,5 +1,5 @@ -/* $OpenBSD: ieee.h,v 1.2 2008/09/07 20:36:06 martynas Exp $ */ -/* $NetBSD: ieee.h,v 1.1 1996/09/30 16:34:25 ws Exp $ */ +/* $OpenBSD: ieee.h,v 1.2 2008/09/07 20:36:06 martynas Exp $ */ +/* $NetBSD: ieee.h,v 1.1 1996/09/30 16:34:25 ws Exp $ */ /* * Copyright (c) 1992, 1993 @@ -38,7 +38,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ieee.h 8.1 (Berkeley) 6/11/93 + * @(#)ieee.h 8.1 (Berkeley) 6/11/93 */ /* @@ -50,27 +50,27 @@ /* * Define the number of bits in each fraction and exponent. * - * k k+1 + * k k+1 * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented * - * (-exp_bias+1) + * (-exp_bias+1) * as fractions that look like 0.fffff x 2 . This means that * - * -126 + * -126 * the number 0.10000 x 2 , for instance, is the same as the normalized * - * -127 -128 + * -127 -128 * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero * - * -129 + * -129 * in the fraction; to represent 2 , we need two, and so on. This * - * (-exp_bias-fracbits+1) + * (-exp_bias-fracbits+1) * implies that the smallest denormalized number is 2 * * for whichever format we are talking about: for single precision, for * - * -126 -149 + * -126 -149 * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and * * -149 == -127 - 23 + 1. diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/sockaddr.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/sockaddr.h index 3a1a9586e..94dc548a3 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/sockaddr.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/sockaddr.h @@ -25,12 +25,12 @@ typedef unsigned short int sa_family_t; of the data types used for socket addresses, `struct sockaddr', `struct sockaddr_in', `struct sockaddr_un', etc. */ -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family +#define __SOCKADDR_COMMON(sa_prefix) \ + sa_family_t sa_prefix##family -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) +#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) /* Size of struct sockaddr_storage. */ #define _SS_SIZE 128 -#endif \ No newline at end of file +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/socket.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/socket.h index 2f0bd0e29..fe19269bb 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/socket.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/socket.h @@ -31,24 +31,24 @@ typedef __socklen_t socklen_t; /* Structure describing a generic socket address. */ struct sockaddr { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ + __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ + char sa_data[14]; /* Address data. */ }; struct msghdr { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ + void *msg_name; /* Address to send to/receive from. */ + socklen_t msg_namelen; /* Length of address data. */ - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - size_t msg_iovlen; /* Number of elements in the vector. */ + struct iovec *msg_iov; /* Vector of data to send/receive into. */ + size_t msg_iovlen; /* Number of elements in the vector. */ - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - size_t msg_controllen; /* Ancillary data buffer length. - !! The type should be socklen_t but the + void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ + size_t msg_controllen; /* Ancillary data buffer length. + !! The type should be socklen_t but the definition of the kernel is incompatible with this. */ - int msg_flags; /* Flags on received message. */ + int msg_flags; /* Flags on received message. */ }; -#endif \ No newline at end of file +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/stat.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/stat.h index 7ba561f46..43b477632 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/stat.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/stat.h @@ -25,39 +25,39 @@ /* Versions of the `struct stat' data structure. */ #ifndef __x86_64__ -# define _STAT_VER_LINUX_OLD 1 -# define _STAT_VER_KERNEL 1 -# define _STAT_VER_SVR4 2 -# define _STAT_VER_LINUX 3 +# define _STAT_VER_LINUX_OLD 1 +# define _STAT_VER_KERNEL 1 +# define _STAT_VER_SVR4 2 +# define _STAT_VER_LINUX 3 /* i386 versions of the `xmknod' interface. */ -# define _MKNOD_VER_LINUX 1 -# define _MKNOD_VER_SVR4 2 -# define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ +# define _MKNOD_VER_LINUX 1 +# define _MKNOD_VER_SVR4 2 +# define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ #else -# define _STAT_VER_KERNEL 0 -# define _STAT_VER_LINUX 1 +# define _STAT_VER_KERNEL 0 +# define _STAT_VER_LINUX 1 /* x86-64 versions of the `xmknod' interface. */ -# define _MKNOD_VER_LINUX 0 +# define _MKNOD_VER_LINUX 0 #endif -#define _STAT_VER _STAT_VER_LINUX +#define _STAT_VER _STAT_VER_LINUX #ifndef _DEV_T_DEFINED_ #define _DEV_T_DEFINED_ -typedef __dev_t dev_t; +typedef __dev_t dev_t; #endif #ifndef _INO_T_DEFINED_ #define _INO_T_DEFINED_ -typedef __ino_t ino_t; +typedef __ino_t ino_t; typedef __ino64_t ino64_t; #endif #ifndef _MODE_T_DEFINED_ #define _MODE_T_DEFINED_ -typedef __mode_t mode_t; +typedef __mode_t mode_t; #endif #ifndef _NLINK_T_DEFINED_ @@ -67,71 +67,71 @@ typedef __nlink_t nlink_t; #ifndef _UID_T_DEFINED_ #define _UID_T_DEFINED_ -typedef __uid_t uid_t; +typedef __uid_t uid_t; #endif #ifndef _GID_T_DEFINED_ #define _GID_T_DEFINED_ -typedef __gid_t gid_t; +typedef __gid_t gid_t; #endif #ifndef _BLKSIZE_T_DEFINED_ #define _BLKSIZE_T_DEFINED_ -typedef __blksize_t blksize_t; +typedef __blksize_t blksize_t; #endif #ifndef _BLKCNT_T_DEFINED_ #define _BLKCNT_T_DEFINED_ -typedef __blkcnt_t blkcnt_t; -typedef __blkcnt64_t blkcnt64_t; +typedef __blkcnt_t blkcnt_t; +typedef __blkcnt64_t blkcnt64_t; #endif struct stat { - dev_t st_dev; /* Device. */ + dev_t st_dev; /* Device. */ #ifndef __x86_64__ unsigned short int __pad1; #endif #if defined __x86_64__ || !defined __USE_FILE_OFFSET64 - ino_t st_ino; /* File serial number. */ + ino_t st_ino; /* File serial number. */ #else - ino_t __st_ino; /* 32bit file serial number. */ + ino_t __st_ino; /* 32bit file serial number. */ #endif #ifndef __x86_64__ - mode_t st_mode; /* File mode. */ - nlink_t st_nlink; /* Link count. */ + mode_t st_mode; /* File mode. */ + nlink_t st_nlink; /* Link count. */ #else - nlink_t st_nlink; /* Link count. */ - mode_t st_mode; /* File mode. */ + nlink_t st_nlink; /* Link count. */ + mode_t st_mode; /* File mode. */ #endif - uid_t st_uid; /* User ID of the file's owner. */ - gid_t st_gid; /* Group ID of the file's group.*/ + uid_t st_uid; /* User ID of the file's owner. */ + gid_t st_gid; /* Group ID of the file's group.*/ #ifdef __x86_64__ int __pad0; #endif - dev_t st_rdev; /* Device number, if device. */ + dev_t st_rdev; /* Device number, if device. */ #ifndef __x86_64__ unsigned short int __pad2; #endif #if defined __x86_64__ || !defined __USE_FILE_OFFSET64 - off_t st_size; /* Size of file, in bytes. */ + off_t st_size; /* Size of file, in bytes. */ #else - off64_t st_size; /* Size of file, in bytes. */ + off64_t st_size; /* Size of file, in bytes. */ #endif - blksize_t st_blksize; /* Optimal block size for I/O. */ + blksize_t st_blksize; /* Optimal block size for I/O. */ #if defined __x86_64__ || !defined __USE_FILE_OFFSET64 - blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ + blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ #else - blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ + blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif - time_t st_atime; /* Time of last access. */ - unsigned long int st_atimensec; /* Nscecs of last access. */ + time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ time_t st_mtime; /* Time of last modification. */ - unsigned long int st_mtimensec; /* Nsecs of last modification. */ - time_t st_ctime; /* Time of last status change. */ - unsigned long int st_ctimensec; /* Nsecs of last status change. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ #ifdef __x86_64__ long int __glibc_reserved[3]; #else @@ -139,37 +139,37 @@ struct stat unsigned long int __glibc_reserved4; unsigned long int __glibc_reserved5; # else - ino64_t st_ino; /* File serial number. */ + ino64_t st_ino; /* File serial number. */ # endif #endif }; struct stat64 { - dev_t st_dev; /* Device. */ + dev_t st_dev; /* Device. */ # ifdef __x86_64__ - ino64_t st_ino; /* File serial number. */ - nlink_t st_nlink; /* Link count. */ - mode_t st_mode; /* File mode. */ + ino64_t st_ino; /* File serial number. */ + nlink_t st_nlink; /* Link count. */ + mode_t st_mode; /* File mode. */ # else unsigned int __pad1; - ino_t __st_ino; /* 32bit file serial number. */ - mode_t st_mode; /* File mode. */ - nlink_t st_nlink; /* Link count. */ + ino_t __st_ino; /* 32bit file serial number. */ + mode_t st_mode; /* File mode. */ + nlink_t st_nlink; /* Link count. */ # endif - uid_t st_uid; /* User ID of the file's owner. */ - gid_t st_gid; /* Group ID of the file's group.*/ + uid_t st_uid; /* User ID of the file's owner. */ + gid_t st_gid; /* Group ID of the file's group.*/ # ifdef __x86_64__ int __pad0; - dev_t st_rdev; /* Device number, if device. */ - off_t st_size; /* Size of file, in bytes. */ + dev_t st_rdev; /* Device number, if device. */ + off_t st_size; /* Size of file, in bytes. */ # else - dev_t st_rdev; /* Device number, if device. */ + dev_t st_rdev; /* Device number, if device. */ unsigned int __pad2; - off64_t st_size; /* Size of file, in bytes. */ + off64_t st_size; /* Size of file, in bytes. */ # endif - blksize_t st_blksize; /* Optimal block size for I/O. */ - blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ + blksize_t st_blksize; /* Optimal block size for I/O. */ + blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ # ifdef __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used @@ -177,70 +177,70 @@ struct stat64 identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ - struct timespec st_atim; /* Time of last access. */ - struct timespec st_mtim; /* Time of last modification. */ - struct timespec st_ctim; /* Time of last status change. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ # else - time_t st_atime; /* Time of last access. */ - unsigned long int st_atimensec; /* Nscecs of last access. */ - time_t st_mtime; /* Time of last modification. */ - unsigned long int st_mtimensec; /* Nsecs of last modification. */ - time_t st_ctime; /* Time of last status change. */ + time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # ifdef __x86_64__ long int __glibc_reserved[3]; # else - ino64_t st_ino; /* File serial number. */ + ino64_t st_ino; /* File serial number. */ # endif }; /* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV /* Nanosecond resolution time values are supported. */ #define _STATBUF_ST_NSEC /* Encoding of the file mode. */ -#define S_IFMT 0170000 /* These bits determine file type. */ +#define S_IFMT 0170000 /* These bits determine file type. */ /* File types. */ -#define S_IFDIR 0040000 /* Directory. */ -#define S_IFCHR 0020000 /* Character device. */ -#define S_IFBLK 0060000 /* Block device. */ -#define S_IFREG 0100000 /* Regular file. */ -#define S_IFIFO 0010000 /* FIFO. */ -#define S_IFLNK 0120000 /* Symbolic link. */ -#define S_IFSOCK 0140000 /* Socket. */ +#define S_IFDIR 0040000 /* Directory. */ +#define S_IFCHR 0020000 /* Character device. */ +#define S_IFBLK 0060000 /* Block device. */ +#define S_IFREG 0100000 /* Regular file. */ +#define S_IFIFO 0010000 /* FIFO. */ +#define S_IFLNK 0120000 /* Symbolic link. */ +#define S_IFSOCK 0140000 /* Socket. */ /* POSIX.1b objects. Note that these macros always evaluate to zero. But they do it by enforcing the correct use of the macros. */ -#define S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) -#define S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) -#define S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) +#define S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) /* Protection bits. */ -#define S_ISUID 04000 /* Set user ID on execution. */ -#define S_ISGID 02000 /* Set group ID on execution. */ -#define S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define S_IREAD 0400 /* Read by owner. */ -#define S_IWRITE 0200 /* Write by owner. */ -#define S_IEXEC 0100 /* Execute by owner. */ +#define S_ISUID 04000 /* Set user ID on execution. */ +#define S_ISGID 02000 /* Set group ID on execution. */ +#define S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define S_IREAD 0400 /* Read by owner. */ +#define S_IWRITE 0200 /* Write by owner. */ +#define S_IEXEC 0100 /* Execute by owner. */ #ifdef __USE_ATFILE -# define UTIME_NOW ((1l << 30) - 1l) -# define UTIME_OMIT ((1l << 30) - 2l) +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) #endif -#define S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask)) +#define S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask)) -#define S_ISDIR(mode) S_ISTYPE((mode), S_IFDIR) -#define S_ISCHR(mode) S_ISTYPE((mode), S_IFCHR) -#define S_ISBLK(mode) S_ISTYPE((mode), S_IFBLK) -#define S_ISREG(mode) S_ISTYPE((mode), S_IFREG) -#define S_ISFIFO(mode) S_ISTYPE((mode), S_IFIFO) -#define S_ISLNK(mode) S_ISTYPE((mode), S_IFLNK) +#define S_ISDIR(mode) S_ISTYPE((mode), S_IFDIR) +#define S_ISCHR(mode) S_ISTYPE((mode), S_IFCHR) +#define S_ISBLK(mode) S_ISTYPE((mode), S_IFBLK) +#define S_ISREG(mode) S_ISTYPE((mode), S_IFREG) +#define S_ISFIFO(mode) S_ISTYPE((mode), S_IFIFO) +#define S_ISLNK(mode) S_ISTYPE((mode), S_IFLNK) -#endif /* bits/stat.h */ +#endif /* bits/stat.h */ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/stdint.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/stdint.h index 97407cea3..51599456d 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/stdint.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/stdint.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdint.h,v 1.4 2006/12/10 22:17:55 deraadt Exp $ */ +/* $OpenBSD: stdint.h,v 1.4 2006/12/10 22:17:55 deraadt Exp $ */ /* * Copyright (c) 1997, 2005 Todd C. Miller diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/struct_timespec.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/struct_timespec.h index f2ac6d7a3..3e3f35626 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/struct_timespec.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/struct_timespec.h @@ -24,8 +24,8 @@ has nanoseconds instead of microseconds. */ struct timespec { - __time_t tv_sec; /* Seconds. */ - long tv_nsec; /* Nanoseconds. */ + __time_t tv_sec; /* Seconds. */ + long tv_nsec; /* Nanoseconds. */ }; #endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/types.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/types.h index cc4e75324..b64f89df0 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/types.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/types.h @@ -1,5 +1,5 @@ -/* $OpenBSD: types.h,v 1.31 2008/03/16 19:42:57 otto Exp $ */ -/* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */ +/* $OpenBSD: types.h,v 1.31 2008/03/16 19:42:57 otto Exp $ */ +/* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */ /*- * Copyright (c) 1982, 1986, 1991, 1993 @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)types.h 8.4 (Berkeley) 1/21/94 + * @(#)types.h 8.4 (Berkeley) 1/21/94 */ #ifndef _SYS_TYPES_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/uio.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/uio.h index e3f33d1cf..00cd177db 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/uio.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/sys/uio.h @@ -21,8 +21,8 @@ /* Structure for scatter/gather I/O. */ struct iovec { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ + void *iov_base; /* Pointer to data. */ + size_t iov_len; /* Length of data. */ }; -#endif \ No newline at end of file +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/time.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/time.h index 29852c567..01cfd6e4e 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/time.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/time.h @@ -1,5 +1,5 @@ -/* $OpenBSD: time.h,v 1.18 2006/01/06 18:53:04 millert Exp $ */ -/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */ +/* $OpenBSD: time.h,v 1.18 2006/01/06 18:53:04 millert Exp $ */ +/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)time.h 5.12 (Berkeley) 3/9/91 + * @(#)time.h 5.12 (Berkeley) 3/9/91 */ #ifndef _TIME_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/unistd.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/unistd.h index 4da748a60..2ab3a9a04 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/unistd.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/unistd.h @@ -1,5 +1,5 @@ -/* $OpenBSD: unistd.h,v 1.62 2008/06/25 14:58:54 millert Exp $ */ -/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ +/* $OpenBSD: unistd.h,v 1.62 2008/06/25 14:58:54 millert Exp $ */ +/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)unistd.h 5.13 (Berkeley) 6/17/91 + * @(#)unistd.h 5.13 (Berkeley) 6/17/91 */ #ifndef _UNISTD_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/wchar.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/wchar.h index 4ca0b39f4..5982aef47 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/wchar.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/wchar.h @@ -1,5 +1,5 @@ -/* $OpenBSD: wchar.h,v 1.11 2010/07/24 09:58:39 guenther Exp $ */ -/* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ +/* $OpenBSD: wchar.h,v 1.11 2010/07/24 09:58:39 guenther Exp $ */ +/* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ /*- * Copyright (c)1999 Citrus Project, diff --git a/chain-tx-enclave/rust-sgx-sdk/common/inc/wctype.h b/chain-tx-enclave/rust-sgx-sdk/common/inc/wctype.h index 25466f15d..fb421afde 100644 --- a/chain-tx-enclave/rust-sgx-sdk/common/inc/wctype.h +++ b/chain-tx-enclave/rust-sgx-sdk/common/inc/wctype.h @@ -1,5 +1,5 @@ -/* $OpenBSD: wctype.h,v 1.5 2006/01/06 18:53:04 millert Exp $ */ -/* $NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ */ +/* $OpenBSD: wctype.h,v 1.5 2006/01/06 18:53:04 millert Exp $ */ +/* $NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ */ /*- * Copyright (c)1999 Citrus Project, @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp + * citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp */ #ifndef _WCTYPE_H_ diff --git a/chain-tx-enclave/rust-sgx-sdk/compiler-rt/Makefile b/chain-tx-enclave/rust-sgx-sdk/compiler-rt/Makefile index 3724326db..8a55b5cb1 100644 --- a/chain-tx-enclave/rust-sgx-sdk/compiler-rt/Makefile +++ b/chain-tx-enclave/rust-sgx-sdk/compiler-rt/Makefile @@ -1,31 +1,19 @@ -# Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Baidu, Inc., nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. include ../buildenv.mk COMMON_DIR := ../common diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/inc/dirent.h b/chain-tx-enclave/rust-sgx-sdk/edl/inc/dirent.h index ba3c2c3ad..be63f8332 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/inc/dirent.h +++ b/chain-tx-enclave/rust-sgx-sdk/edl/inc/dirent.h @@ -1,30 +1,19 @@ -// Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: +// http://www.apache.org/licenses/LICENSE-2.0 // -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in -// the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Baidu, Inc., nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License.. #ifndef _EDL_DIRENT_H #define _EDL_DIRENT_H @@ -47,4 +36,4 @@ struct dirent64_t char d_name[256]; }; -#endif \ No newline at end of file +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/inc/stat.h b/chain-tx-enclave/rust-sgx-sdk/edl/inc/stat.h index ac4376184..7f04c3cec 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/inc/stat.h +++ b/chain-tx-enclave/rust-sgx-sdk/edl/inc/stat.h @@ -1,30 +1,19 @@ -// Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: +// http://www.apache.org/licenses/LICENSE-2.0 // -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in -// the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Baidu, Inc., nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License.. #ifndef _EDL_STAT_H #define _EDL_STAT_H @@ -51,7 +40,7 @@ struct stat_t int64_t __reserved[3]; }; -struct stat64_t +struct stat64_t { uint64_t st_dev; uint64_t st_ino; @@ -73,4 +62,4 @@ struct stat64_t int64_t __reserved[3]; }; -#endif \ No newline at end of file +#endif diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_asyncio.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_asyncio.edl index f0a483ee1..72376ed56 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_asyncio.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_asyncio.edl @@ -1,33 +1,19 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. enclave { @@ -44,4 +30,4 @@ enclave { int u_epoll_ctl_ocall([out] int *error, int epfd, int op, int fd, [in] struct epoll_event *event); int u_epoll_wait_ocall([out] int *error, int epfd, [out, count=maxevents] struct epoll_event * events, int maxevents, int timeout); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_backtrace.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_backtrace.edl index 7f333d6f0..4a9e7ef8c 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_backtrace.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_backtrace.edl @@ -1,34 +1,20 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + enclave { from "sgx_fd.edl" import *; @@ -42,4 +28,4 @@ enclave { untrusted { /* define OCALLs here. */ }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_env.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_env.edl index 6093cf254..edefb130c 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_env.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_env.edl @@ -1,36 +1,24 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + enclave { + include "pwd.h" + trusted { /* define ECALLs here. */ }; @@ -40,5 +28,9 @@ enclave { char * u_getenv_ocall([in, string] const char *name); int u_setenv_ocall([out] int *error, [in, string] const char *name, [in, string] const char *value, int overwrite); int u_unsetenv_ocall([out] int *error, [in, string] const char *name); + int u_chdir_ocall([out] int *error, [in, string] const char *dir); + char *u_getcwd_ocall([out] int *error, [out, size=buflen] char *buf, size_t buflen); + int u_getpwuid_r_ocall(unsigned int uid, [out] struct passwd *pwd, [out, size=buflen] char *buf, size_t buflen, [out] struct passwd **passwd_result); + unsigned int u_getuid_ocall(); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_fd.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_fd.edl index fefe0b159..6596e0391 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_fd.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_fd.edl @@ -1,33 +1,19 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. enclave { @@ -56,6 +42,6 @@ enclave { int u_ioctl_arg0_ocall([out] int *error, int fd, int request); int u_ioctl_arg1_ocall([out] int *error, int fd, int request, [in, out] int *arg); - int u_close_ocall([out] int *error, int fd); + int u_close_ocall([out] int *error, int fd); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_file.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_file.edl index 54c48be7d..e751e79f4 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_file.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_file.edl @@ -1,33 +1,19 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. enclave { @@ -64,13 +50,13 @@ enclave { int u_chmod_ocall([out] int *error, [in, string] const char *path, uint32_t mode); size_t u_readlink_ocall([out] int *error, [in, string] const char *path, [out, size=bufsz] char *buf, size_t bufsz); int u_symlink_ocall([out] int *error, [in, string] const char *path1, [in, string] const char *path2); - char * u_realpath_ocall([out] int *error, [in, string] const char *pathname); + char * u_realpath_ocall([out] int *error, [in, string] const char *pathname); int u_mkdir_ocall([out] int *error, [in, string] const char *pathname, uint32_t mode); int u_rmdir_ocall([out] int *error, [in, string] const char *pathname); void * u_opendir_ocall([out] int *error, [in, string] const char *pathname); - int u_readdir64_r_ocall([out] int *error, [user_check] void *dirp, [in, out] struct dirent64_t *entry, [out] struct dirent64_t **result); + int u_readdir64_r_ocall([user_check] void *dirp, [in, out] struct dirent64_t *entry, [out] struct dirent64_t **result); int u_closedir_ocall([out] int *error, [user_check] void *dirp); int u_dirfd_ocall([out] int *error, [user_check] void *dirp); int u_fstatat64_ocall([out] int *error, int dirfd, [in, string] const char *pathname, [out] struct stat64_t *buf, int flags); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_fs.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_fs.edl index 0e52961ca..2618be935 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_fs.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_fs.edl @@ -1,33 +1,19 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. enclave { @@ -42,4 +28,4 @@ enclave { untrusted { /* define OCALLs here. */ }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_mem.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_mem.edl index a46f0fac4..139a83f34 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_mem.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_mem.edl @@ -1,34 +1,20 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + enclave { trusted { @@ -45,4 +31,4 @@ enclave { int u_msync_ocall([out] int *error, [user_check] void *addr, size_t length, int flags); int u_mprotect_ocall([out] int *error, [user_check] void *addr, size_t length, int prot); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_net.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_net.edl index 6d6c33e73..7cc01dcf3 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_net.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_net.edl @@ -1,36 +1,25 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. enclave { + include "sys/socket.h" + include "netdb.h" + from "sgx_socket.edl" import *; from "sgx_asyncio.edl" import *; from "sgx_fd.edl" import *; @@ -41,6 +30,8 @@ enclave { }; untrusted { - /* define OCALLs here. */ + int u_getaddrinfo_ocall([out]int * error, [in, string] const char * node, [in, string] const char * service, [in] const struct addrinfo * hints, [out] struct addrinfo ** res); + void u_freeaddrinfo_ocall([user_check] struct addrinfo *res); + char *u_gai_strerror_ocall(int errcode); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_net_switchless.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_net_switchless.edl index a149b40eb..2af2b5cbf 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_net_switchless.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_net_switchless.edl @@ -1,33 +1,19 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. enclave { @@ -36,7 +22,7 @@ enclave { from "sgx_fs.edl" import *; from "sgx_time.edl" import *; from "sgx_mem.edl" import *; - + trusted { /* define ECALLs here. */ }; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_pipe.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_pipe.edl index fcca6c167..00c12f5e7 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_pipe.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_pipe.edl @@ -1,33 +1,19 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. enclave { @@ -40,6 +26,6 @@ enclave { untrusted { int u_pipe_ocall([out] int *error, [out, count=2] int *pipefd); - int u_pipe2_ocall([out] int *error, [out, count=2] int *pipefd, int flags); + int u_pipe2_ocall([out] int *error, [out, count=2] int *pipefd, int flags); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_socket.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_socket.edl index 2e6ab0bac..b082c715c 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_socket.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_socket.edl @@ -1,33 +1,19 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. enclave { @@ -103,4 +89,4 @@ enclave { [out] socklen_t *addrlen_out); int u_shutdown_ocall([out] int *error, int sockfd, int how); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_stdio.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_stdio.edl index 84a70f04f..5367d9ab9 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_stdio.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_stdio.edl @@ -1,38 +1,24 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + enclave { from "sgx_fd.edl" import *; - + trusted { /* define ECALLs here. */ }; @@ -40,4 +26,4 @@ enclave { untrusted { /* define OCALLs here. */ }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_sys.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_sys.edl index 54a9aaded..ce1a5380c 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_sys.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_sys.edl @@ -1,34 +1,20 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + enclave { trusted { @@ -37,5 +23,6 @@ enclave { untrusted { long u_sysconf_ocall([out] int *error, int name); + int u_prctl_ocall([out] int *error, int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_thread.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_thread.edl new file mode 100644 index 000000000..f210f696c --- /dev/null +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_thread.edl @@ -0,0 +1,33 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +enclave { + + include "time.h" + include "pthread.h" + + trusted { + public void *t_thread_main([in, size=len]void *arg, int len); + }; + + untrusted { + int u_pthread_create_ocall([out]pthread_t *thread, [in]const pthread_attr_t *attr, [user_check]void *start_routine, [in, size=len]void *arg, int len); + int u_pthread_join_ocall(pthread_t thread, [out]void **result); + int u_pthread_detach_ocall(pthread_t thread); + int u_sched_yield_ocall([out]int *error); + int u_nanosleep_ocall([out]int *error, [in]const struct timespec *req, [out]struct timespec *rem); + }; +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_time.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_time.edl index 8f3c19106..adeeeccf9 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_time.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_time.edl @@ -1,34 +1,20 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + enclave { include "time.h" @@ -40,4 +26,4 @@ enclave { untrusted { int u_clock_gettime_ocall([out] int *error, int clk_id, [out] struct timespec *tp); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_tstd.edl b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_tstd.edl index 70e83b9bf..62fb049ce 100644 --- a/chain-tx-enclave/rust-sgx-sdk/edl/sgx_tstd.edl +++ b/chain-tx-enclave/rust-sgx-sdk/edl/sgx_tstd.edl @@ -1,34 +1,20 @@ -/* - * Copyright (C) 2017-2019 Baidu, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Baidu, Inc., nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + enclave { from "sgx_time.edl" import *; @@ -42,8 +28,8 @@ enclave { untrusted { /* define OCALLs here. */ int u_thread_set_event_ocall([out] int *error, [user_check] const void *tcs); - int u_thread_wait_event_ocall([out] int *error, [user_check] const void *tcs, int timeout); + int u_thread_wait_event_ocall([out] int *error, [user_check] const void *tcs, [in]const struct timespec *timeout); int u_thread_set_multiple_events_ocall([out]int *error, [in, count=total]const void ** tcss, int total); - int u_thread_setwait_events_ocall([out]int *error, [user_check]const void * waiter_tcs, [user_check]const void * self_tcs, int timeout); + int u_thread_setwait_events_ocall([out]int *error, [user_check]const void * waiter_tcs, [user_check]const void * self_tcs, [in]const struct timespec *timeout); }; -}; \ No newline at end of file +}; diff --git a/chain-tx-enclave/rust-sgx-sdk/version b/chain-tx-enclave/rust-sgx-sdk/version index cfde476e7..3afde5882 100644 --- a/chain-tx-enclave/rust-sgx-sdk/version +++ b/chain-tx-enclave/rust-sgx-sdk/version @@ -1 +1 @@ -f29f4e71896589908cd4b43ed70a623a81eda0e5 +5b5e512abbbfc3030e8cb274989fb372b685b168 diff --git a/chain-tx-enclave/tx-query/Dockerfile b/chain-tx-enclave/tx-query/Dockerfile index 38f5cfc82..4f81051ce 100644 --- a/chain-tx-enclave/tx-query/Dockerfile +++ b/chain-tx-enclave/tx-query/Dockerfile @@ -1,4 +1,4 @@ -FROM baiduxlab/sgx-rust:1804-1.0.9 +FROM baiduxlab/sgx-rust:1804-1.1.0 LABEL maintainer="Crypto.com" RUN echo 'source /opt/sgxsdk/environment' >> /root/.docker_bashrc && \ diff --git a/chain-tx-enclave/tx-query/Makefile b/chain-tx-enclave/tx-query/Makefile index 7110cb582..a6e97226a 100644 --- a/chain-tx-enclave/tx-query/Makefile +++ b/chain-tx-enclave/tx-query/Makefile @@ -125,7 +125,7 @@ RustEnclave_Link_Libs := -L$(CUSTOM_LIBRARY_PATH) -lcompiler-rt-patch -lenclave RustEnclave_Compile_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $(RustEnclave_Include_Paths) RustEnclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -l$(Service_Library_Name) -l$(Crypto_Library_Name) $(RustEnclave_Link_Libs) -Wl,--end-group \ + -Wl,--start-group -lsgx_tcxx -lsgx_tstdc -l$(Service_Library_Name) -l$(Crypto_Library_Name) $(RustEnclave_Link_Libs) -Wl,--end-group \ -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ -Wl,--defsym,__ImageBase=0 \ diff --git a/chain-tx-enclave/tx-query/app/Cargo.toml b/chain-tx-enclave/tx-query/app/Cargo.toml index 81c8a6f8e..530101f3d 100644 --- a/chain-tx-enclave/tx-query/app/Cargo.toml +++ b/chain-tx-enclave/tx-query/app/Cargo.toml @@ -14,12 +14,12 @@ sgx-test = ["client-core", "client-common"] log = "0.4.0" env_logger = "0.7.0" enclave-u-common = { path = "../../enclave-u-common" } -sgx_types = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } -sgx_urts = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_types = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_urts = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } parity-scale-codec = { features = ["derive"], version = "1.0" } chain-core = { path = "../../../chain-core" } enclave-protocol = { path = "../../../enclave-protocol" } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism"] } zmq = "0.9" client-core = { path = "../../../client-core", optional = true } client-common = { path = "../../../client-common", optional = true } \ No newline at end of file diff --git a/chain-tx-enclave/tx-query/app/src/main.rs b/chain-tx-enclave/tx-query/app/src/main.rs index 203ffa261..6291b7e99 100644 --- a/chain-tx-enclave/tx-query/app/src/main.rs +++ b/chain-tx-enclave/tx-query/app/src/main.rs @@ -1,5 +1,3 @@ -#![feature(const_string_new)] - mod enclave_u; #[cfg(feature = "sgx-test")] diff --git a/chain-tx-enclave/tx-query/enclave/Cargo.toml b/chain-tx-enclave/tx-query/enclave/Cargo.toml index 65b9587f5..acd9b0990 100644 --- a/chain-tx-enclave/tx-query/enclave/Cargo.toml +++ b/chain-tx-enclave/tx-query/enclave/Cargo.toml @@ -15,28 +15,28 @@ default = [] sgx-test = [] [target.'cfg(not(target_env = "sgx"))'.dependencies] -sgx_types = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git" } -sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git", features = ["net"] } -sgx_tcrypto = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git" } -sgx_tse = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git" } -sgx_rand = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git" } -sgx_tseal = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_types = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git" } +sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git", features = ["net"] } +sgx_tcrypto = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git" } +sgx_tse = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git" } +sgx_rand = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git" } +sgx_tseal = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } parity-scale-codec = { default-features = false, features = ["derive"], version = "1.0" } chain-core = { path = "../../../chain-core", default-features = false, features = ["mesalock_sgx"] } enclave-protocol = { path = "../../../enclave-protocol", default-features = false, features = ["mesalock_sgx"] } enclave-t-common = { path = "../../enclave-t-common" } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism", "sgx"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism", "sgx"] } [dependencies] -chrono = { git = "https://github.com/mesalock-linux/chrono-sgx" } -webpki = { git = "https://github.com/mesalock-linux/webpki", branch = "mesalock_sgx" } -base64 = { git = "https://github.com/mesalock-linux/rust-base64-sgx" } -yasna = { git = "https://github.com/mesalock-linux/yasna.rs-sgx", features = ["bit-vec", "num-bigint", "chrono"] } -num-bigint = { git = "https://github.com/mesalock-linux/num-bigint-sgx" } +chrono = { git = "https://github.com/crypto-com/sgx-vendor" } +webpki = { git = "https://github.com/crypto-com/sgx-vendor" } +base64 = { git = "https://github.com/crypto-com/sgx-vendor" } +yasna = { git = "https://github.com/crypto-com/sgx-vendor", features = ["bit-vec", "num-bigint", "chrono"] } +num-bigint = { git = "https://github.com/crypto-com/sgx-vendor" } bit-vec = { version = "0.6.1", default-features = false} httparse = { version = "1.3.2", default-features = false } itertools = { version = "0.8", default-features = false, features = []} -rustls = { git = "https://github.com/mesalock-linux/rustls", branch = "mesalock_sgx" } -webpki-roots= { git = "https://github.com/mesalock-linux/webpki-roots", branch = "mesalock_sgx" } +rustls = { git = "https://github.com/crypto-com/sgx-vendor" } +webpki-roots= { git = "https://github.com/crypto-com/sgx-vendor" } lazy_static = { version = "1.4", features = ["spin_no_std"] } zeroize = { version = "1.0", default-features = false, features = ["zeroize_derive"]} \ No newline at end of file diff --git a/chain-tx-enclave/tx-validation/Dockerfile b/chain-tx-enclave/tx-validation/Dockerfile index 6cb0ccb8e..eb72dda0f 100644 --- a/chain-tx-enclave/tx-validation/Dockerfile +++ b/chain-tx-enclave/tx-validation/Dockerfile @@ -1,4 +1,4 @@ -FROM baiduxlab/sgx-rust:1804-1.0.9 +FROM baiduxlab/sgx-rust:1804-1.1.0 LABEL maintainer="Crypto.com" RUN echo 'source /opt/sgxsdk/environment' >> /root/.docker_bashrc && \ diff --git a/chain-tx-enclave/tx-validation/Makefile b/chain-tx-enclave/tx-validation/Makefile index 09e5041e8..5a3a367c4 100644 --- a/chain-tx-enclave/tx-validation/Makefile +++ b/chain-tx-enclave/tx-validation/Makefile @@ -122,7 +122,7 @@ RustEnclave_Link_Libs := -L$(CUSTOM_LIBRARY_PATH) -lcompiler-rt-patch -lenclave RustEnclave_Compile_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $(RustEnclave_Include_Paths) RustEnclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -l$(Service_Library_Name) -l$(Crypto_Library_Name) $(RustEnclave_Link_Libs) -Wl,--end-group \ + -Wl,--start-group -lsgx_tcxx -lsgx_tstdc -l$(Service_Library_Name) -l$(Crypto_Library_Name) $(RustEnclave_Link_Libs) -Wl,--end-group \ -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ -Wl,--defsym,__ImageBase=0 \ diff --git a/chain-tx-enclave/tx-validation/app/Cargo.toml b/chain-tx-enclave/tx-validation/app/Cargo.toml index 996cc573a..6d3ecf357 100644 --- a/chain-tx-enclave/tx-validation/app/Cargo.toml +++ b/chain-tx-enclave/tx-validation/app/Cargo.toml @@ -15,10 +15,10 @@ zmq = "0.9" log = "0.4.0" env_logger = "0.7.0" enclave-u-common = { path = "../../enclave-u-common" } -sgx_types = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } -sgx_urts = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_types = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_urts = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } chain-core = { path = "../../../chain-core" } chain-tx-validation = { path = "../../../chain-tx-validation" } enclave-protocol = { path = "../../../enclave-protocol" } parity-scale-codec = { version = "1.0" } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism"] } diff --git a/chain-tx-enclave/tx-validation/enclave/Cargo.toml b/chain-tx-enclave/tx-validation/enclave/Cargo.toml index 11e701376..cfedb12cc 100644 --- a/chain-tx-enclave/tx-validation/enclave/Cargo.toml +++ b/chain-tx-enclave/tx-validation/enclave/Cargo.toml @@ -15,17 +15,17 @@ default = [] sgx-test = [] [target.'cfg(not(target_env = "sgx"))'.dependencies] -sgx_tse = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } -sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk", features = ["net","backtrace"] } -sgx_rand = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } -sgx_trts = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } -sgx_types = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } -sgx_tseal = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } -sgx_tcrypto = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_tse = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk", features = ["net","backtrace"] } +sgx_rand = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_trts = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_types = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_tseal = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } +sgx_tcrypto = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk" } enclave-macro = { path = "../../enclave-macro" } chain-tx-validation = { path = "../../../chain-tx-validation", default-features = false, features = ["mesalock_sgx"] } chain-core = { path = "../../../chain-core", default-features = false, features = ["mesalock_sgx"] } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism", "sgx"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism", "sgx"] } parity-scale-codec = { default-features = false, version = "1.0" } enclave-protocol = { path = "../../../enclave-protocol", default-features = false, features = ["mesalock_sgx"] } chain-tx-filter = { path = "../../../chain-tx-filter", default-features = false, features = ["mesalock_sgx"] } diff --git a/chain-tx-enclave/tx-validation/enclave/src/validate.rs b/chain-tx-enclave/tx-validation/enclave/src/validate.rs index 338e1ce66..85979b6b0 100644 --- a/chain-tx-enclave/tx-validation/enclave/src/validate.rs +++ b/chain-tx-enclave/tx-validation/enclave/src/validate.rs @@ -13,7 +13,7 @@ use enclave_protocol::{ }; use enclave_t_common::check_unseal; use lazy_static::lazy_static; -use parity_scale_codec::{Decode, Encode}; +use parity_scale_codec::Encode; use sgx_tseal::SgxSealedData; use sgx_types::{sgx_sealed_data_t, sgx_status_t}; use std::prelude::v1::{Box, Vec}; diff --git a/chain-tx-filter/Cargo.toml b/chain-tx-filter/Cargo.toml index 4fc09e0b7..54f9e409b 100644 --- a/chain-tx-filter/Cargo.toml +++ b/chain-tx-filter/Cargo.toml @@ -13,9 +13,9 @@ mesalock_sgx = ["sgx_tstd", "secp256k1zkp/sgx", "chain-core/mesalock_sgx"] [dependencies] chain-core = { default-features = false, path = "../chain-core" } parity-scale-codec = { default-features = false, version = "1.1" } -secp256k1zkp = { default-features = false, git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["endomorphism"] } +secp256k1zkp = { default-features = false, git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["endomorphism"] } bit-vec = { default-features = false, version = "0.6" } -sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true } +sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true } [dev-dependencies] quickcheck = "0.9" diff --git a/chain-tx-validation/Cargo.toml b/chain-tx-validation/Cargo.toml index 7c700575a..93055d9b3 100644 --- a/chain-tx-validation/Cargo.toml +++ b/chain-tx-validation/Cargo.toml @@ -12,6 +12,6 @@ mesalock_sgx = ["sgx_tstd", "secp256k1zkp/sgx", "chain-core/mesalock_sgx"] [dependencies] chain-core = { path = "../chain-core", default-features = false } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism"] } parity-scale-codec = { features = ["derive"], default-features = false, version = "1.1" } -sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true } +sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true } diff --git a/ci-scripts/Dockerfile b/ci-scripts/Dockerfile index 53e30a7ca..8c909c404 100644 --- a/ci-scripts/Dockerfile +++ b/ci-scripts/Dockerfile @@ -1,4 +1,4 @@ -FROM baiduxlab/sgx-rust:1804-1.0.9 +FROM baiduxlab/sgx-rust:1804-1.1.0 LABEL maintainer="Crypto.com" RUN echo 'source /opt/sgxsdk/environment' >> /root/.docker_bashrc && \ diff --git a/client-common/Cargo.toml b/client-common/Cargo.toml index ddfa8ee91..770c38b8e 100644 --- a/client-common/Cargo.toml +++ b/client-common/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] chain-core = { path = "../chain-core" } chain-tx-filter = { path = "../chain-tx-filter" } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["serde", "zeroize", "rand", "recovery", "endomorphism", "musig"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["serde", "zeroize", "rand", "recovery", "endomorphism", "musig"] } rand = "0.7" log = "0.4" aes-gcm-siv = "0.3" diff --git a/client-core/Cargo.toml b/client-core/Cargo.toml index ff20be7b1..803383c19 100644 --- a/client-core/Cargo.toml +++ b/client-core/Cargo.toml @@ -11,7 +11,7 @@ client-common = { path = "../client-common" } chain-tx-filter = { path = "../chain-tx-filter" } enclave-protocol = { path = "../enclave-protocol" } chain-tx-validation = { path = "../chain-tx-validation" } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["serde", "zeroize", "rand", "recovery", "endomorphism", "musig"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["serde", "zeroize", "rand", "recovery", "endomorphism", "musig"] } parity-scale-codec = { features = ["derive"], version = "1.1" } chrono = { version = "0.4", features = ["serde"] } rand = "0.7" diff --git a/client-network/Cargo.toml b/client-network/Cargo.toml index fe2607cda..7c5bd786a 100644 --- a/client-network/Cargo.toml +++ b/client-network/Cargo.toml @@ -16,8 +16,8 @@ base64 = "0.11" chrono = { version = "0.4", features = ["serde"] } parity-scale-codec = { features = ["derive"], version = "1.1" } hex = "0.4.0" -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery"] } tendermint = { git = "https://github.com/crypto-com/tendermint-rs.git", default-features = false, rev = "8e95731ee671777638ab2a3d5dfd7b35992b86aa" } [dev-dependencies] -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["serde", "zeroize", "rand", "recovery", "endomorphism"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["serde", "zeroize", "rand", "recovery", "endomorphism"] } diff --git a/enclave-protocol/Cargo.toml b/enclave-protocol/Cargo.toml index b6283786a..6fb62a7e8 100644 --- a/enclave-protocol/Cargo.toml +++ b/enclave-protocol/Cargo.toml @@ -14,5 +14,5 @@ mesalock_sgx = ["sgx_tstd", "secp256k1zkp/sgx", "chain-core/mesalock_sgx", "chai chain-core = { path = "../chain-core", default-features = false } chain-tx-validation = { path = "../chain-tx-validation", default-features = false } parity-scale-codec = { version = "1.1", default-features = false, features = ["derive"] } -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd" } -sgx_tstd = { rev = "v1.0.9", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", default-features = false, rev = "be445f29a96af31fe079611d26c07f1f596d1c5f" } +sgx_tstd = { rev = "5b5e512abbbfc3030e8cb274989fb372b685b168", git = "https://github.com/baidu/rust-sgx-sdk.git", optional = true } diff --git a/test-common/Cargo.toml b/test-common/Cargo.toml index 21097383f..a912c2fdc 100644 --- a/test-common/Cargo.toml +++ b/test-common/Cargo.toml @@ -17,7 +17,7 @@ signature = "1.0.0-pre.1" abci = "0.6" kvdb-memorydb = "0.1" protobuf = "2.7.0" -secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "8b9a38b870a7759fcdbd4a5d435b5ba873c70afd", features = ["recovery", "endomorphism"] } +secp256k1zkp = { git = "https://github.com/crypto-com/rust-secp256k1-zkp.git", rev = "be445f29a96af31fe079611d26c07f1f596d1c5f", features = ["recovery", "endomorphism"] } parity-scale-codec = { features = ["derive"], version = "1.1" } base64 = "0.11" hex = "0.4" From ba3fd5c8c7b7ee4ea4d7dd75cd66d55569456422 Mon Sep 17 00:00:00 2001 From: Tomas Tauber <2410580+tomtau@users.noreply.github.com> Date: Fri, 13 Dec 2019 13:31:13 +0800 Subject: [PATCH 2/2] Problem: unjailing test takes huge amount of space and hangs up for 1 hour if compilation fails Solution: commented out the pipeline until its test execution is more sane --- .drone.yml | 65 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/.drone.yml b/.drone.yml index a1593102d..ff6bc935d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -123,39 +123,42 @@ trigger: - push ---- -kind: pipeline -type: exec -name: integration-tests-jail-unjail - -platform: - os: linux - arch: amd64 - -steps: -- name: integration-tests - commands: - - cd integration-tests/jail - - ./run.sh -- name: teardown - commands: - - cd integration-tests/jail - - ./shutdown.sh - when: - status: - - success - - failure - -trigger: - branch: - - master - - staging - - trying - event: - - push +# FIMXE: 1) no need for this to be exec pipeline (can run in docker -- unjailtx doesn't ever touch enclave) +# FIXME: 2) proper cleanup -- this thing took over 100gb of 1 day of running +# FIXME: 3) it runs `cargo build` inside docker compose service and happily continue even if the compilation fails, wtf +# --- +# kind: pipeline +# type: exec +# name: integration-tests-jail-unjail + +# platform: +# os: linux +# arch: amd64 + +# steps: +# - name: integration-tests +# commands: +# - cd integration-tests/jail +# - ./run.sh +# - name: teardown +# commands: +# - cd integration-tests/jail +# - ./shutdown.sh +# when: +# status: +# - success +# - failure + +# trigger: +# branch: +# - master +# - staging +# - trying +# event: +# - push --- kind: signature -hmac: b0227856638a61f1a221c4bae23276462a9200632ebeb3ad60aae3c27f61af02 +hmac: e0c075115c89bf62208031eb72f28eda5f9b045d201e7e4449a486455aad5f96 ...