From 6482de3403a8585609529bf2ce6f7ad4f45a94c8 Mon Sep 17 00:00:00 2001 From: Junichi TANAKA Date: Fri, 27 Sep 2024 11:37:56 +0900 Subject: [PATCH 1/5] bump lcp to v0.2.10 --- Cargo.lock | 12 +- e2e/Enclave.mk | 17 +- e2e/ImportRustSGXSDK.mk | 23 - e2e/{rust-sgx-sdk => }/buildenv.mk | 0 e2e/enclave/Cargo.lock | 724 ++++++------------ e2e/enclave/Cargo.toml | 34 +- e2e/enclave/Enclave.edl | 15 - e2e/enclave/src/lib.rs | 4 - e2e/lcp | 2 +- e2e/rust-sgx-sdk/common/inc/assert.h | 63 -- e2e/rust-sgx-sdk/common/inc/complex.h | 134 ---- e2e/rust-sgx-sdk/common/inc/ctype.h | 65 -- e2e/rust-sgx-sdk/common/inc/dirent.h | 48 -- e2e/rust-sgx-sdk/common/inc/endian.h | 33 - e2e/rust-sgx-sdk/common/inc/errno.h | 187 ----- e2e/rust-sgx-sdk/common/inc/float.h | 84 -- e2e/rust-sgx-sdk/common/inc/inttypes.h | 330 -------- e2e/rust-sgx-sdk/common/inc/iso646.h | 26 - e2e/rust-sgx-sdk/common/inc/limits.h | 41 - e2e/rust-sgx-sdk/common/inc/math.h | 430 ----------- e2e/rust-sgx-sdk/common/inc/mbusafecrt.h | 85 -- e2e/rust-sgx-sdk/common/inc/netdb.h | 41 - e2e/rust-sgx-sdk/common/inc/poll.h | 38 - e2e/rust-sgx-sdk/common/inc/pwd.h | 40 - e2e/rust-sgx-sdk/common/inc/sched.h | 62 -- e2e/rust-sgx-sdk/common/inc/setjmp.h | 65 -- e2e/rust-sgx-sdk/common/inc/signal.h | 104 --- e2e/rust-sgx-sdk/common/inc/stdarg.h | 48 -- e2e/rust-sgx-sdk/common/inc/stdbool.h | 44 -- e2e/rust-sgx-sdk/common/inc/stddef.h | 70 -- e2e/rust-sgx-sdk/common/inc/stdint.h | 24 - e2e/rust-sgx-sdk/common/inc/stdio.h | 95 --- e2e/rust-sgx-sdk/common/inc/stdlib.h | 153 ---- e2e/rust-sgx-sdk/common/inc/string.h | 130 ---- e2e/rust-sgx-sdk/common/inc/sys/_types.h | 168 ---- e2e/rust-sgx-sdk/common/inc/sys/cdefs.h | 132 ---- e2e/rust-sgx-sdk/common/inc/sys/endian.h | 54 -- e2e/rust-sgx-sdk/common/inc/sys/epoll.h | 42 - e2e/rust-sgx-sdk/common/inc/sys/ieee.h | 145 ---- e2e/rust-sgx-sdk/common/inc/sys/limits.h | 77 -- e2e/rust-sgx-sdk/common/inc/sys/sockaddr.h | 32 - e2e/rust-sgx-sdk/common/inc/sys/socket.h | 54 -- e2e/rust-sgx-sdk/common/inc/sys/stat.h | 127 --- e2e/rust-sgx-sdk/common/inc/sys/stdint.h | 260 ------- .../common/inc/sys/struct_timespec.h | 37 - e2e/rust-sgx-sdk/common/inc/sys/types.h | 129 ---- e2e/rust-sgx-sdk/common/inc/sys/uio.h | 35 - e2e/rust-sgx-sdk/common/inc/time.h | 105 --- e2e/rust-sgx-sdk/common/inc/unistd.h | 59 -- e2e/rust-sgx-sdk/common/inc/wchar.h | 143 ---- e2e/rust-sgx-sdk/common/inc/wctype.h | 80 -- elc/Cargo.toml | 2 +- elc/src/lib.rs | 3 +- proto/Cargo.toml | 1 + rust-toolchain | 2 +- 55 files changed, 270 insertions(+), 4688 deletions(-) delete mode 100755 e2e/ImportRustSGXSDK.mk rename e2e/{rust-sgx-sdk => }/buildenv.mk (100%) delete mode 100644 e2e/rust-sgx-sdk/common/inc/assert.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/complex.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/ctype.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/dirent.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/endian.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/errno.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/float.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/inttypes.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/iso646.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/limits.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/math.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/mbusafecrt.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/netdb.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/poll.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/pwd.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sched.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/setjmp.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/signal.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/stdarg.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/stdbool.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/stddef.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/stdint.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/stdio.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/stdlib.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/string.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/_types.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/cdefs.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/endian.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/epoll.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/ieee.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/limits.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/sockaddr.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/socket.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/stat.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/stdint.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/struct_timespec.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/types.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/sys/uio.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/time.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/unistd.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/wchar.h delete mode 100644 e2e/rust-sgx-sdk/common/inc/wctype.h diff --git a/Cargo.lock b/Cargo.lock index 71e4032..31b9cd0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -196,7 +196,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "commitments" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "alloy-sol-types", "crypto", @@ -245,7 +245,7 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", "hex", @@ -624,7 +624,7 @@ dependencies = [ [[package]] name = "lcp-proto" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "ibc-proto", "prost", @@ -634,7 +634,7 @@ dependencies = [ [[package]] name = "lcp-types" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", "hex", @@ -709,7 +709,7 @@ dependencies = [ [[package]] name = "light-client" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "bincode", "commitments", @@ -1282,7 +1282,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "store" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", "log", diff --git a/e2e/Enclave.mk b/e2e/Enclave.mk index 5c16e12..33dfac8 100644 --- a/e2e/Enclave.mk +++ b/e2e/Enclave.mk @@ -1,6 +1,3 @@ -######## Import SGX SDK ######## -include ImportRustSGXSDK.mk - ######## SGX SDK Settings ######## SGX_SDK ?= /opt/sgxsdk SGX_MODE ?= HW @@ -9,7 +6,7 @@ SGX_DEBUG ?= 0 SGX_PRERELEASE ?= 0 SGX_PRODUCTION ?= 0 -include rust-sgx-sdk/buildenv.mk +include buildenv.mk ifeq ($(shell getconf LONG_BIT), 32) SGX_ARCH := x86 @@ -52,7 +49,8 @@ endif SGX_COMMON_CFLAGS += -fstack-protector -CARGO_FEATURES = --features=default +ENCLAVE_CARGO_FEATURES = --features=default +APP_CARGO_FEATURES = --features=default ifeq ($(SGX_PRODUCTION), 1) SGX_ENCLAVE_MODE = "Production Mode" SGX_ENCLAVE_CONFIG = $(SGX_ENCLAVE_CONFIG) @@ -63,7 +61,8 @@ else SGX_ENCLAVE_CONFIG = "enclave/Enclave.config.xml" SGX_SIGN_KEY = "enclave/Enclave_private.pem" ifneq ($(SGX_MODE), HW) - CARGO_FEATURES = --features=default,sgx-sw + ENCLAVE_CARGO_FEATURES = --features=default + APP_CARGO_FEATURES = --features=default,sgx-sw endif endif @@ -93,7 +92,7 @@ ProtectedFs_Library_Name := sgx_tprotected_fs RustEnclave_C_Files := $(wildcard ./enclave/*.c) RustEnclave_C_Objects := $(RustEnclave_C_Files:.c=.o) -RustEnclave_Include_Paths := -I$(CUSTOM_COMMON_PATH)/inc -I$(CUSTOM_EDL_PATH) -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport -I$(SGX_SDK)/include/epid -I ./enclave -I./include +RustEnclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport -I$(SGX_SDK)/include/epid -I ./enclave -I./include RustEnclave_Link_Libs := -L$(CUSTOM_LIBRARY_PATH) -lenclave RustEnclave_Compile_Flags := $(SGX_COMMON_CFLAGS) $(ENCLAVE_CFLAGS) $(RustEnclave_Include_Paths) @@ -110,7 +109,7 @@ Signed_RustEnclave_Name := bin/enclave.signed.so ######## EDL Objects ######## $(Enclave_EDL_Files): $(SGX_EDGER8R) enclave/Enclave.edl - $(SGX_EDGER8R) --trusted enclave/Enclave.edl --search-path $(SGX_SDK)/include --search-path $(CUSTOM_EDL_PATH) --trusted-dir enclave + $(SGX_EDGER8R) --trusted enclave/Enclave.edl --search-path $(SGX_SDK)/include --trusted-dir enclave @echo "GEN => $(Enclave_EDL_Files)" ######## Enclave Objects ######## @@ -130,6 +129,6 @@ $(Signed_RustEnclave_Name): $(RustEnclave_Name) .PHONY: enclave enclave: - @cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) $(CARGO_FEATURES) + cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) $(CARGO_FEATURES) @mkdir -p ./lib @cp enclave/target/$(OUTPUT_PATH)/libproxy_enclave.a ./lib/libenclave.a diff --git a/e2e/ImportRustSGXSDK.mk b/e2e/ImportRustSGXSDK.mk deleted file mode 100755 index 16cb3cc..0000000 --- a/e2e/ImportRustSGXSDK.mk +++ /dev/null @@ -1,23 +0,0 @@ -# helper script to fetch the files in rust-sgx-sdk to the target version - -GIT = git -CP = cp - -REPO = https://github.com/apache/incubator-teaclave-sgx-sdk -SDK_PATH_GIT = rust-sgx-sdk-github -SDK_PATH = rust-sgx-sdk -VERSION_FILE = rust-sgx-sdk/version -TARGET_VERSION = $(shell cat $(VERSION_FILE)) -COMMAND = git ls-remote $(REPO) HEAD | awk '{ print $$1 }' - -updatesdk: - @echo Target version = $(TARGET_VERSION) - - @rm -rf $(SDK_PATH_GIT) - @$(GIT) clone $(REPO) $(SDK_PATH_GIT) - @cd $(SDK_PATH_GIT) && $(GIT) checkout $(TARGET_VERSION) && cd .. - rsync -a $(SDK_PATH_GIT)/buildenv.mk $(SDK_PATH) - rsync -a $(SDK_PATH_GIT)/edl $(SDK_PATH) - rsync -a $(SDK_PATH_GIT)/common $(SDK_PATH) - rsync -a $(SDK_PATH_GIT)/dockerfile $(SDK_PATH) - rm -rf $(SDK_PATH_GIT) diff --git a/e2e/rust-sgx-sdk/buildenv.mk b/e2e/buildenv.mk similarity index 100% rename from e2e/rust-sgx-sdk/buildenv.mk rename to e2e/buildenv.mk diff --git a/e2e/enclave/Cargo.lock b/e2e/enclave/Cargo.lock index be0941c..10c716d 100644 --- a/e2e/enclave/Cargo.lock +++ b/e2e/enclave/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom", "once_cell", @@ -20,7 +20,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "600d34d8de81e23b6d909c094e23b3d357e01ca36b78a8c5424c501eedbe86f0" dependencies = [ "bytes", - "cfg-if 1.0.0", + "cfg-if", "const-hex", "derive_more", "hex-literal", @@ -42,7 +42,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.77", "syn-solidity", "tiny-keccak 2.0.2", ] @@ -63,74 +63,46 @@ name = "amcl" version = "0.3.0" source = "git+https://github.com/datachainlab/milagro_bls?rev=bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095#bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "attestation-report" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ - "base64 0.21.2 (git+https://github.com/marshallpierce/rust-base64)", + "base64 0.22.1", "chrono", "crypto", "flex-error", "hex", "lcp-types", "pem", - "rustls", "serde", "serde_json", "sgx_types", - "tendermint", - "webpki", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.13.0" -source = "git+https://github.com/mesalock-linux/rust-base64-sgx#dc7389e10817b078f289386b3b6a852ab6c4c021" -dependencies = [ - "sgx_tstd", -] +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "base64" @@ -140,14 +112,15 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.21.2" -source = "git+https://github.com/marshallpierce/rust-base64#1e8246a889f2b43299279e0c7ebd849dcaa7cb32" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "besu-qbft-elc" @@ -187,9 +160,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -229,34 +202,19 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -265,11 +223,10 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ - "android-tzdata", "num-traits", "serde", ] @@ -277,7 +234,7 @@ dependencies = [ [[package]] name = "commitments" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "alloy-sol-types", "crypto", @@ -291,11 +248,11 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.11.3" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "hex", "proptest", @@ -305,7 +262,7 @@ dependencies = [ [[package]] name = "context" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "crypto", "lcp-types", @@ -321,9 +278,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -337,14 +294,13 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", "hex", "libsecp256k1", "serde", "serde-big-array", - "sgx_rand", "sgx_trts", "sgx_tseal", "sgx_types", @@ -373,9 +329,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -383,40 +339,49 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.29", + "syn 2.0.77", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.29", + "syn 2.0.77", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -440,50 +405,50 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.77", ] [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecall-commands" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ - "attestation-report", "commitments", "crypto", "flex-error", "lcp-types", "serde", + "serde_with", + "sgx_types", "store", ] [[package]] name = "ecall-handler" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "attestation-report", "context", "crypto", "ecall-commands", "enclave-environment", - "enclave-remote-attestation", "flex-error", - "hex", "lcp-types", "light-client", + "sgx_tse", "sgx_types", "store", ] @@ -499,9 +464,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "enclave" @@ -509,49 +474,22 @@ version = "0.1.0" dependencies = [ "besu-qbft-elc", "enclave-runtime", - "log 0.4.20", - "simple_logger", ] [[package]] name = "enclave-environment" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "host-api", "light-client", "store", ] -[[package]] -name = "enclave-remote-attestation" -version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" -dependencies = [ - "attestation-report", - "base64 0.21.2 (git+https://github.com/marshallpierce/rust-base64)", - "chrono", - "crypto", - "flex-error", - "host-api", - "httparse", - "itertools 0.8.2", - "lcp-types", - "log 0.4.20", - "ocall-commands", - "rustls", - "sgx_tcrypto", - "sgx_tse", - "sgx_tstd", - "sgx_types", - "webpki", - "webpki-roots", -] - [[package]] name = "enclave-runtime" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "bincode", "ecall-commands", @@ -559,18 +497,20 @@ dependencies = [ "enclave-environment", "enclave-utils", "flex-error", - "log 0.4.20", + "host-api", + "log", "once_cell", - "sgx_tstd", + "sgx_alloc", + "sgx_trts", "sgx_types", ] [[package]] name = "enclave-utils" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ - "log 0.4.20", + "log", "sgx_trts", "sgx_types", ] @@ -604,7 +544,7 @@ source = "git+https://github.com/datachainlab/ethereum-light-client-rs?rev=186c5 dependencies = [ "displaydoc", "ethereum-consensus", - "log 0.4.20", + "log", "patricia-merkle-trie", "primitive-types", "rlp", @@ -644,9 +584,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -658,9 +598,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -668,33 +608,33 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-sink", @@ -716,12 +656,9 @@ dependencies = [ [[package]] name = "getrandom" version = "0.2.8" -source = "git+https://github.com/datachainlab/getrandom-sgx?branch=v0.2.8#d47804e23f845f682735c1237ef558a1c9009ecf" +source = "git+https://github.com/datachainlab/getrandom-sgx-lite#06e0045d6eb34b2f0109a5735ac6f0027edef4d9" dependencies = [ - "cfg-if 0.1.10", - "sgx_libc", "sgx_trts", - "sgx_tstd", ] [[package]] @@ -750,14 +687,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" - -[[package]] -name = "hashbrown_tstd" -version = "0.12.0" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -765,15 +697,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hex" version = "0.4.3" @@ -813,7 +736,7 @@ dependencies = [ [[package]] name = "host-api" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "bincode", "flex-error", @@ -822,12 +745,6 @@ dependencies = [ "store", ] -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - [[package]] name = "ibc-proto" version = "0.26.0" @@ -862,21 +779,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.14.0", -] - -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", + "hashbrown 0.14.5", ] [[package]] @@ -890,15 +798,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ "spin", ] @@ -906,7 +814,7 @@ dependencies = [ [[package]] name = "lcp-proto" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "ibc-proto", "prost", @@ -916,7 +824,7 @@ dependencies = [ [[package]] name = "lcp-types" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", "hex", @@ -930,9 +838,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" @@ -955,7 +863,7 @@ dependencies = [ "libsecp256k1-gen-genmult", "rand", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "typenum", ] @@ -991,7 +899,7 @@ dependencies = [ [[package]] name = "light-client" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "bincode", "commitments", @@ -1004,24 +912,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.14" -source = "git+https://github.com/mesalock-linux/log-sgx#2ca9039a9ebba0ed90ed2ad57425917d4b3a2a24" -dependencies = [ - "cfg-if 1.0.0", - "sgx_tstd", -] - -[[package]] -name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memory-db" @@ -1046,15 +945,20 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-derive" version = "0.3.3" @@ -1068,19 +972,18 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -1089,25 +992,23 @@ dependencies = [ [[package]] name = "ocall-commands" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "serde", - "serde_with", - "sgx_types", "store", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "parity-scale-codec" @@ -1139,7 +1040,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "hashbrown 0.12.3", "impl-trait-for-tuples", "parity-util-mem-derive", @@ -1159,9 +1060,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "patricia-merkle-trie" @@ -1184,14 +1085,14 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" dependencies = [ - "base64 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.21.7", ] [[package]] name = "pin-project-lite" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1199,17 +1100,26 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "uint", @@ -1251,18 +1161,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bitflags", "num-traits", @@ -1289,7 +1199,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools", "proc-macro2", "quote", "syn 1.0.109", @@ -1306,9 +1216,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1353,17 +1263,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "ring" -version = "0.16.19" -source = "git+https://github.com/mesalock-linux/ring-sgx?tag=v0.16.5#844efe271ed78a399d803b2579f5f2424d543c9f" -dependencies = [ - "cc", - "sgx_tstd", - "spin", - "untrusted", -] - [[package]] name = "rlp" version = "0.5.2" @@ -1376,9 +1275,9 @@ dependencies = [ [[package]] name = "rs_merkle" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05225752ca6ede4cb1b73aa37ce3904affd042e98f28246f56f438ebfd47a810" +checksum = "3b241d2e59b74ef9e98d94c78c47623d04c8392abaf82014dfd372a16041128f" dependencies = [ "sha2 0.10.6", ] @@ -1411,53 +1310,30 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] -[[package]] -name = "rustls" -version = "0.19.0" -source = "git+https://github.com/mesalock-linux/rustls?branch=mesalock_sgx#95b5e79dc24b02f3ce424437eb9698509d0baf58" -dependencies = [ - "base64 0.13.0", - "log 0.4.14", - "ring", - "sct", - "sgx_tstd", - "webpki", -] - [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "sct" -version = "0.6.0" -source = "git+https://github.com/mesalock-linux/sct.rs?branch=mesalock_sgx#c4d859cca232e6c9d88ca12048df3bc26e1ed4ad" -dependencies = [ - "ring", - "sgx_tstd", - "untrusted", -] +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.186" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -1473,44 +1349,45 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.12" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.186" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.16" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.77", ] [[package]] @@ -1537,7 +1414,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.77", ] [[package]] @@ -1545,26 +1422,6 @@ name = "sgx_alloc" version = "1.1.6" source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" -[[package]] -name = "sgx_backtrace_sys" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" -dependencies = [ - "cc", - "sgx_build_helper", - "sgx_libc", -] - -[[package]] -name = "sgx_build_helper" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" - -[[package]] -name = "sgx_demangle" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" - [[package]] name = "sgx_libc" version = "1.1.6" @@ -1573,16 +1430,6 @@ dependencies = [ "sgx_types", ] -[[package]] -name = "sgx_rand" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" -dependencies = [ - "sgx_trts", - "sgx_tstd", - "sgx_types", -] - [[package]] name = "sgx_tcrypto" version = "1.1.6" @@ -1591,15 +1438,6 @@ dependencies = [ "sgx_types", ] -[[package]] -name = "sgx_tprotected_fs" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" -dependencies = [ - "sgx_trts", - "sgx_types", -] - [[package]] name = "sgx_trts" version = "1.1.6" @@ -1628,42 +1466,18 @@ dependencies = [ "sgx_types", ] -[[package]] -name = "sgx_tstd" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" -dependencies = [ - "hashbrown_tstd", - "sgx_alloc", - "sgx_backtrace_sys", - "sgx_demangle", - "sgx_libc", - "sgx_tprotected_fs", - "sgx_trts", - "sgx_types", - "sgx_unwind", -] - [[package]] name = "sgx_types" version = "1.1.6" source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" -[[package]] -name = "sgx_unwind" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" -dependencies = [ - "sgx_build_helper", -] - [[package]] name = "sha2" -version = "0.9.8" -source = "git+https://github.com/bluele/hashes?branch=0.9.8-sha256-hwa-disabled#e2eca6bba23623a3534636c127cc3b448a0237e1" +version = "0.9.9" +source = "git+https://github.com/bluele/hashes?branch=0.9.9-sha256-hwa-disabled#2119233e1f4a24e1bd3d815055d452951c5881ac" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -1674,7 +1488,7 @@ name = "sha2" version = "0.10.6" source = "git+https://github.com/bluele/hashes?branch=0.10.6-sha256-hwa-disabled#d7be7095f363f7710570815cda8cbde24903f1b3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.7", ] @@ -1685,29 +1499,17 @@ version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -[[package]] -name = "simple_logger" -version = "2.3.0" -source = "git+https://github.com/bluele/rust-simple_logger?branch=sgx#9cf5a3234be461e294fa5f5bc8d999c43e7a0211" -dependencies = [ - "atty", - "log 0.4.20", - "once_cell", - "sgx_tstd", - "winapi", -] - [[package]] name = "smallvec" -version = "1.11.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "spin" -version = "0.5.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "ssz-rs" @@ -1719,7 +1521,7 @@ dependencies = [ "lazy_static", "num-bigint", "serde", - "sha2 0.9.8", + "sha2 0.9.9", "ssz-rs-derive", "thiserror", ] @@ -1743,24 +1545,24 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "store" version = "0.1.0" -source = "git+https://github.com/datachainlab/lcp?rev=v0.2.9#8934493d4e9ca37917587ccf8da666ce81fbbe92" +source = "git+https://github.com/datachainlab/lcp?rev=v0.2.10#69ffe7d94b186b2761e45ebda306be35dc30b001" dependencies = [ "flex-error", - "log 0.4.20", + "log", "serde", ] [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subtle-encoding" @@ -1784,9 +1586,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -1802,7 +1604,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.77", ] [[package]] @@ -1870,30 +1672,33 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.77", ] [[package]] name = "time" -version = "0.3.19" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53250a3b3fed8ff8fd988587d8925d26a83ac3845d9e03b220b37f34c2b8d6c2" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -1901,16 +1706,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.7" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a460aeb8de6dcb0f381e1ee05f1cd56fcf5a5f6eb8187ff3d8f0b11078d38b7c" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -1934,15 +1740,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", "toml_datetime", @@ -1957,15 +1763,15 @@ checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ "hash-db", "hashbrown 0.12.3", - "log 0.4.20", + "log", "smallvec", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -1987,21 +1793,15 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "valuable" @@ -2011,28 +1811,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "webpki" -version = "0.21.4" -source = "git+https://github.com/mesalock-linux/webpki?branch=mesalock_sgx#8dbe6fbeefadf05582ae47c7fa818b04db49c61e" -dependencies = [ - "ring", - "sgx_tstd", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.21.0" -source = "git+https://github.com/mesalock-linux/webpki-roots?rev=6ff3be547ac13ccd46ae55605ad6506ce30688ef#6ff3be547ac13ccd46ae55605ad6506ce30688ef" -dependencies = [ - "sgx_tstd", - "webpki", -] +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "winapi" @@ -2058,9 +1839,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winnow" -version = "0.5.15" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -2074,11 +1855,32 @@ dependencies = [ "tap", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "zeroize" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -2091,35 +1893,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.77", ] - -[[patch.unused]] -name = "sgx_crypto_helper" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" - -[[patch.unused]] -name = "sgx_serialize" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" - -[[patch.unused]] -name = "sgx_serialize_derive" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" - -[[patch.unused]] -name = "sgx_serialize_derive_internals" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" - -[[patch.unused]] -name = "sgx_tcrypto_helper" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" - -[[patch.unused]] -name = "sgx_urts" -version = "1.1.6" -source = "git+https://github.com/apache/incubator-teaclave-sgx-sdk?rev=v1.1.6#c3d82372dff81e5bafb07f71bc8ad532d06b504e" diff --git a/e2e/enclave/Cargo.toml b/e2e/enclave/Cargo.toml index 9a204b5..74384a6 100644 --- a/e2e/enclave/Cargo.toml +++ b/e2e/enclave/Cargo.toml @@ -8,43 +8,15 @@ resolver = "2" name = "proxy_enclave" crate-type = ["staticlib"] -[features] -default = [] -production = [ - "enclave-runtime/production" -] -sgx-sw = [ - "enclave-runtime/sgx-sw" -] - [dependencies] -log = { version = "0.4.8", default-features = false } -simple_logger = { git = "https://github.com/bluele/rust-simple_logger", branch = "sgx", default-features = false, features = ["sgx"] } - -enclave-runtime = { git = "https://github.com/datachainlab/lcp", rev = "v0.2.9" } +enclave-runtime = { git = "https://github.com/datachainlab/lcp", rev = "v0.2.10" } besu-qbft-elc = { path = "../../elc", default-features = false } -[patch."https://github.com/apache/teaclave-sgx-sdk.git"] -sgx_tstd = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_urts = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_tse = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_alloc = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_libc = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_serialize = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_serialize_derive = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_serialize_derive_internals = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_trts = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_types = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_tcrypto = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_tcrypto_helper = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_crypto_helper = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } -sgx_rand = { rev = "v1.1.6", git = "https://github.com/apache/incubator-teaclave-sgx-sdk" } - [patch."crates-io"] -getrandom = { git = "https://github.com/datachainlab/getrandom-sgx", branch = "v0.2.8" } +getrandom = { git = "https://github.com/datachainlab/getrandom-sgx-lite" } # TODO these patches would be better as optional sha2-0106 = { git = "https://github.com/bluele/hashes", branch = "0.10.6-sha256-hwa-disabled", package = "sha2" } -sha2-098 = { git = "https://github.com/bluele/hashes", branch = "0.9.8-sha256-hwa-disabled", package = "sha2" } +sha2-099 = { git = "https://github.com/bluele/hashes", branch = "0.9.9-sha256-hwa-disabled", package = "sha2" } [profile.release] opt-level = 3 diff --git a/e2e/enclave/Enclave.edl b/e2e/enclave/Enclave.edl index 5df7db7..4e46f11 100644 --- a/e2e/enclave/Enclave.edl +++ b/e2e/enclave/Enclave.edl @@ -1,20 +1,5 @@ enclave { - from "sgx_backtrace.edl" import *; - from "sgx_tstd.edl" import *; - from "sgx_stdio.edl" import *; - from "sgx_backtrace.edl" import *; - from "sgx_tstdc.edl" import *; - from "sgx_tprotected_fs.edl" import *; - from "sgx_fs.edl" import *; - from "sgx_net.edl" import *; - from "sgx_time.edl" import *; - from "sgx_env.edl" import *; - from "sgx_thread.edl" import *; - from "sgx_pipe.edl" import *; - - include "sgx_quote.h" - trusted { public sgx_status_t ecall_execute_command( diff --git a/e2e/enclave/src/lib.rs b/e2e/enclave/src/lib.rs index 596c405..c196778 100644 --- a/e2e/enclave/src/lib.rs +++ b/e2e/enclave/src/lib.rs @@ -4,10 +4,6 @@ extern crate alloc; use enclave_runtime::{setup_runtime, Environment, MapLightClientRegistry}; setup_runtime!({ - simple_logger::SimpleLogger::new() - .with_level(log::LevelFilter::Info) - .init() - .unwrap(); Environment::new(build_lc_registry()) }); diff --git a/e2e/lcp b/e2e/lcp index 8934493..69ffe7d 160000 --- a/e2e/lcp +++ b/e2e/lcp @@ -1 +1 @@ -Subproject commit 8934493d4e9ca37917587ccf8da666ce81fbbe92 +Subproject commit 69ffe7d94b186b2761e45ebda306be35dc30b001 diff --git a/e2e/rust-sgx-sdk/common/inc/assert.h b/e2e/rust-sgx-sdk/common/inc/assert.h deleted file mode 100644 index a153995..0000000 --- a/e2e/rust-sgx-sdk/common/inc/assert.h +++ /dev/null @@ -1,63 +0,0 @@ -/* $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 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)assert.h 8.2 (Berkeley) 1/21/94 - */ - -/* - * Unlike other ANSI header files, may usefully be included - * multiple times, with and without NDEBUG defined. - */ - -#include - -#undef assert - -#ifdef NDEBUG -# define assert(e) ((void)0) -#else -# define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, __func__, #e)) -#endif - -#ifndef _ASSERT_H_DECLS -#define _ASSERT_H_DECLS -__BEGIN_DECLS - -void _TLIBC_CDECL_ __assert(const char *, int, const char *, const char *); - -__END_DECLS -#endif /* Not _ASSERT_H_DECLS */ - diff --git a/e2e/rust-sgx-sdk/common/inc/complex.h b/e2e/rust-sgx-sdk/common/inc/complex.h deleted file mode 100644 index 904cb31..0000000 --- a/e2e/rust-sgx-sdk/common/inc/complex.h +++ /dev/null @@ -1,134 +0,0 @@ -/* $OpenBSD: complex.h,v 1.3 2010/07/24 22:17:03 guenther Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _COMPLEX_H_ -#define _COMPLEX_H_ - -#include - -/* - * C99 - */ -#ifdef __GNUC__ -#if __STDC_VERSION__ < 199901 -#define _Complex __complex__ -#endif -#define _Complex_I 1.0fi -#elif defined(lint) -#define _Complex_I 1.0fi -#endif - -#define complex _Complex - -/* XXX switch to _Imaginary_I */ -#undef I -#define I _Complex_I - -__BEGIN_DECLS -/* - * Double versions of C99 functions - */ -double complex cacos(double complex); -double complex casin(double complex); -double complex catan(double complex); -double complex ccos(double complex); -double complex csin(double complex); -double complex ctan(double complex); -double complex cacosh(double complex); -double complex casinh(double complex); -double complex catanh(double complex); -double complex ccosh(double complex); -double complex csinh(double complex); -double complex ctanh(double complex); -double complex cexp(double complex); -double complex clog(double complex); -double cabs(double complex); -double complex cpow(double complex, double complex); -double complex csqrt(double complex); -double carg(double complex); -double cimag(double complex); -double complex conj(double complex); -double complex cproj(double complex); -double creal(double complex); -/* - * C99 reserved - */ -double complex clog10(double complex); - -/* - * Float versions of C99 functions - */ -float complex cacosf(float complex); -float complex casinf(float complex); -float complex catanf(float complex); -float complex ccosf(float complex); -float complex csinf(float complex); -float complex ctanf(float complex); -float complex cacoshf(float complex); -float complex casinhf(float complex); -float complex catanhf(float complex); -float complex ccoshf(float complex); -float complex csinhf(float complex); -float complex ctanhf(float complex); -float complex cexpf(float complex); -float complex clogf(float complex); -float cabsf(float complex); -float complex cpowf(float complex, float complex); -float complex csqrtf(float complex); -float cargf(float complex); -float cimagf(float complex); -float complex conjf(float complex); -float complex cprojf(float complex); -float crealf(float complex); -/* - * C99 reserved - */ -float complex clog10f(float complex); - -/* - * Long double versions of C99 functions - */ -long double complex cacosl(long double complex); -long double complex casinl(long double complex); -long double complex catanl(long double complex); -long double complex ccosl(long double complex); -long double complex csinl(long double complex); -long double complex ctanl(long double complex); -long double complex cacoshl(long double complex); -long double complex casinhl(long double complex); -long double complex catanhl(long double complex); -long double complex ccoshl(long double complex); -long double complex csinhl(long double complex); -long double complex ctanhl(long double complex); -long double complex cexpl(long double complex); -long double complex clogl(long double complex); -long double cabsl(long double complex); -long double complex cpowl(long double complex, long double complex); -long double complex csqrtl(long double complex); -long double cargl(long double complex); -long double cimagl(long double complex); -long double complex conjl(long double complex); -long double complex cprojl(long double complex); -long double creall(long double complex); -/* - * C99 reserved - */ -long double complex clog10l(long double complex); - -__END_DECLS - -#endif /* !_COMPLEX_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/ctype.h b/e2e/rust-sgx-sdk/common/inc/ctype.h deleted file mode 100644 index 57ac70f..0000000 --- a/e2e/rust-sgx-sdk/common/inc/ctype.h +++ /dev/null @@ -1,65 +0,0 @@ -/* $OpenBSD: ctype.h,v 1.22 2010/10/01 20:10:24 guenther Exp $ */ -/* $NetBSD: ctype.h,v 1.14 1994/10/26 00:55:47 cgd Exp $ */ - -/* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)ctype.h 5.3 (Berkeley) 4/3/91 - */ - -#ifndef _CTYPE_H_ -#define _CTYPE_H_ - -#include - -__BEGIN_DECLS - -int _TLIBC_CDECL_ isalnum(int); -int _TLIBC_CDECL_ isalpha(int); -int _TLIBC_CDECL_ iscntrl(int); -int _TLIBC_CDECL_ isdigit(int); -int _TLIBC_CDECL_ isgraph(int); -int _TLIBC_CDECL_ islower(int); -int _TLIBC_CDECL_ isprint(int); -int _TLIBC_CDECL_ ispunct(int); -int _TLIBC_CDECL_ isspace(int); -int _TLIBC_CDECL_ isupper(int); -int _TLIBC_CDECL_ isxdigit(int); -int _TLIBC_CDECL_ tolower(int); -int _TLIBC_CDECL_ toupper(int); -int _TLIBC_CDECL_ isblank(int); -int _TLIBC_CDECL_ isascii(int); - -__END_DECLS - -#endif /* _CTYPE_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/dirent.h b/e2e/rust-sgx-sdk/common/inc/dirent.h deleted file mode 100644 index a0ede03..0000000 --- a/e2e/rust-sgx-sdk/common/inc/dirent.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license.s -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _DIRENT_H_ -#define _DIRENT_H_ - -struct dirent { - __ino_t d_ino; - __off_t d_off; - unsigned short d_reclen; - unsigned char d_type; - char d_name[256]; -}; - -struct dirent64 { - __ino64_t d_ino; - __off64_t d_off; - unsigned short d_reclen; - unsigned char d_type; - char d_name[256]; -}; - -#define d_fileno d_ino - -#endif /* _DIRENT_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/endian.h b/e2e/rust-sgx-sdk/common/inc/endian.h deleted file mode 100644 index 2620c58..0000000 --- a/e2e/rust-sgx-sdk/common/inc/endian.h +++ /dev/null @@ -1,33 +0,0 @@ -/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */ - -/*- - * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef _ENDIAN_H_ -#define _ENDIAN_H_ - -#include - -#endif /* _ENDIAN_H_ */ - diff --git a/e2e/rust-sgx-sdk/common/inc/errno.h b/e2e/rust-sgx-sdk/common/inc/errno.h deleted file mode 100644 index dbe293c..0000000 --- a/e2e/rust-sgx-sdk/common/inc/errno.h +++ /dev/null @@ -1,187 +0,0 @@ -/* $OpenBSD: errno.h,v 1.1 2005/12/28 16:33:56 millert Exp $ */ - -/* - * Copyright (c) 1982, 1986, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)errno.h 8.5 (Berkeley) 1/21/94 - */ - -#ifndef _ERRNO_H_ -#define _ERRNO_H_ - -#include - -#define EPERM 1 -#define ENOENT 2 -#define ESRCH 3 -#define EINTR 4 -#define EIO 5 -#define ENXIO 6 -#define E2BIG 7 -#define ENOEXEC 8 -#define EBADF 9 -#define ECHILD 10 -#define EAGAIN 11 -#define ENOMEM 12 -#define EACCES 13 -#define EFAULT 14 -#define ENOTBLK 15 -#define EBUSY 16 -#define EEXIST 17 -#define EXDEV 18 -#define ENODEV 19 -#define ENOTDIR 20 -#define EISDIR 21 -#define EINVAL 22 -#define ENFILE 23 -#define EMFILE 24 -#define ENOTTY 25 -#define ETXTBSY 26 -#define EFBIG 27 -#define ENOSPC 28 -#define ESPIPE 29 -#define EROFS 30 -#define EMLINK 31 -#define EPIPE 32 -#define EDOM 33 -#define ERANGE 34 -#define EDEADLK 35 -#define ENAMETOOLONG 36 -#define ENOLCK 37 -#define ENOSYS 38 -#define ENOTEMPTY 39 -#define ELOOP 40 -#define EWOULDBLOCK EAGAIN -#define ENOMSG 42 -#define EIDRM 43 -#define ECHRNG 44 -#define EL2NSYNC 45 -#define EL3HLT 46 -#define EL3RST 47 -#define ELNRNG 48 -#define EUNATCH 49 -#define ENOCSI 50 -#define EL2HLT 51 -#define EBADE 52 -#define EBADR 53 -#define EXFULL 54 -#define ENOANO 55 -#define EBADRQC 56 -#define EBADSLT 57 -#define EDEADLOCK EDEADLK -#define EBFONT 59 -#define ENOSTR 60 -#define ENODATA 61 -#define ETIME 62 -#define ENOSR 63 -#define ENONET 64 -#define ENOPKG 65 -#define EREMOTE 66 -#define ENOLINK 67 -#define EADV 68 -#define ESRMNT 69 -#define ECOMM 70 -#define EPROTO 71 -#define EMULTIHOP 72 -#define EDOTDOT 73 -#define EBADMSG 74 -#define EOVERFLOW 75 -#define ENOTUNIQ 76 -#define EBADFD 77 -#define EREMCHG 78 -#define ELIBACC 79 -#define ELIBBAD 80 -#define ELIBSCN 81 -#define ELIBMAX 82 -#define ELIBEXEC 83 -#define EILSEQ 84 -#define ERESTART 85 -#define ESTRPIPE 86 -#define EUSERS 87 -#define ENOTSOCK 88 -#define EDESTADDRREQ 89 -#define EMSGSIZE 90 -#define EPROTOTYPE 91 -#define ENOPROTOOPT 92 -#define EPROTONOSUPPORT 93 -#define ESOCKTNOSUPPORT 94 -#define EOPNOTSUPP 95 -#define EPFNOSUPPORT 96 -#define EAFNOSUPPORT 97 -#define EADDRINUSE 98 -#define EADDRNOTAVAIL 99 -#define ENETDOWN 100 -#define ENETUNREACH 101 -#define ENETRESET 102 -#define ECONNABORTED 103 -#define ECONNRESET 104 -#define ENOBUFS 105 -#define EISCONN 106 -#define ENOTCONN 107 -#define ESHUTDOWN 108 -#define ETOOMANYREFS 109 -#define ETIMEDOUT 110 -#define ECONNREFUSED 111 -#define EHOSTDOWN 112 -#define EHOSTUNREACH 113 -#define EALREADY 114 -#define EINPROGRESS 115 -#define ESTALE 116 -#define EUCLEAN 117 -#define ENOTNAM 118 -#define ENAVAIL 119 -#define EISNAM 120 -#define EREMOTEIO 121 -#define EDQUOT 122 -#define ENOMEDIUM 123 -#define EMEDIUMTYPE 124 -#define ECANCELED 125 -#define ENOKEY 126 -#define EKEYEXPIRED 127 -#define EKEYREVOKED 128 -#define EKEYREJECTED 129 -#define EOWNERDEAD 130 -#define ENOTRECOVERABLE 131 -#define ERFKILL 132 -#define EHWPOISON 133 -#define ENOTSUP EOPNOTSUPP - -__BEGIN_DECLS - -#ifndef errno -int * _TLIBC_CDECL_ __errno(void); -#define errno (*__errno()) -#endif /* errno */ -__END_DECLS - -#endif /* _ERRNO_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/float.h b/e2e/rust-sgx-sdk/common/inc/float.h deleted file mode 100644 index e38a7c6..0000000 --- a/e2e/rust-sgx-sdk/common/inc/float.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $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. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)float.h 7.1 (Berkeley) 5/8/90 - */ - -#ifndef _FLOAT_H_ -#define _FLOAT_H_ - -#include - -#define FLT_RADIX 2 /* b */ - -// The rounding direction can be specified by fesetround() in -#define FLT_ROUNDS 1 /* addition rounding: near */ -#define DECIMAL_DIG 21 /* max precision in decimal digits */ - -// NOTE: FLT_EVAL_METHOD is -1 under FREEBSD x86. -#ifdef __i386__ -#define FLT_EVAL_METHOD 2 /* long double */ -#else -#define FLT_EVAL_METHOD 0 /* no promotions */ -#endif - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX_10_EXP 308 - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP (-125) /* emin */ -#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ - -#define DBL_MAX 1.7976931348623157E+308 -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ - -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.08420217248550443401e-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.36210314311209350626e-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.18973149535723176502e+4932L -#define LDBL_MAX_10_EXP 4932 - -#endif /* _FLOAT_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/inttypes.h b/e2e/rust-sgx-sdk/common/inc/inttypes.h deleted file mode 100644 index fbc009c..0000000 --- a/e2e/rust-sgx-sdk/common/inc/inttypes.h +++ /dev/null @@ -1,330 +0,0 @@ -/* $OpenBSD: inttypes.h,v 1.10 2009/01/13 18:13:51 kettenis Exp $ */ - -/* - * Copyright (c) 1997, 2005 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _INTTYPES_H_ -#define _INTTYPES_H_ - -#include - -/* - * 7.8.1 Macros for format specifiers - * - * Each of the following object-like macros expands to a string - * literal containing a conversion specifier, possibly modified by - * a prefix such as hh, h, l, or ll, suitable for use within the - * format argument of a formatted input/output function when - * converting the corresponding integer type. These macro names - * have the general form of PRI (character string literals for the - * fprintf family) or SCN (character string literals for the fscanf - * family), followed by the conversion specifier, followed by a - * name corresponding to a similar typedef name. For example, - * PRIdFAST32 can be used in a format string to print the value of - * an integer of type int_fast32_t. - */ - -/* fprintf macros for signed integers */ -#define PRId8 "d" /* int8_t */ -#define PRId16 "d" /* int16_t */ -#define PRId32 "d" /* int32_t */ -#ifdef __x86_64__ -#define PRId64 "ld" /* int64_t */ -#else -#define PRId64 "lld" /* int64_t */ -#endif - -#define PRIdLEAST8 "d" /* int_least8_t */ -#define PRIdLEAST16 "d" /* int_least16_t */ -#define PRIdLEAST32 "d" /* int_least32_t */ -#ifdef __x86_64__ -#define PRIdLEAST64 "ld" /* int_least64_t */ -#else -#define PRIdLEAST64 "lld" /* int_least64_t */ -#endif - -#define PRIdFAST8 "d" /* int_fast8_t */ -#ifdef __x86_64__ -#define PRIdFAST16 "ld" /* int_fast16_t */ -#define PRIdFAST32 "ld" /* int_fast32_t */ -#define PRIdFAST64 "ld" /* int_fast64_t */ -#else -#define PRIdFAST16 "d" /* int_fast16_t */ -#define PRIdFAST32 "d" /* int_fast32_t */ -#define PRIdFAST64 "lld" /* int_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIdMAX "ld" /* intmax_t */ -#else -#if defined(__i386__) -#define PRIdMAX "lld" /* intmax_t */ -#else -#define PRIdMAX "jd" /* intmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIdPTR "d" /* intptr_t */ -#else -#define PRIdPTR "ld" /* intptr_t */ -#endif - -#define PRIi8 "i" /* int8_t */ -#define PRIi16 "i" /* int16_t */ -#define PRIi32 "i" /* int32_t */ -#ifdef __x86_64__ -#define PRIi64 "li" /* int64_t */ -#else -#define PRIi64 "lli" /* int64_t */ -#endif - -#define PRIiLEAST8 "i" /* int_least8_t */ -#define PRIiLEAST16 "i" /* int_least16_t */ -#define PRIiLEAST32 "i" /* int_least32_t */ -#ifdef __x86_64__ -#define PRIiLEAST64 "li" /* int_least64_t */ -#else -#define PRIiLEAST64 "lli" /* int_least64_t */ -#endif - -#define PRIiFAST8 "i" /* int_fast8_t */ -#ifdef __x86_64__ -#define PRIiFAST16 "li" /* int_fast16_t */ -#define PRIiFAST32 "li" /* int_fast32_t */ -#define PRIiFAST64 "li" /* int_fast64_t */ -#else -#define PRIiFAST16 "i" /* int_fast16_t */ -#define PRIiFAST32 "i" /* int_fast32_t */ -#define PRIiFAST64 "lli" /* int_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIiMAX "li" /* intmax_t */ -#else -#if defined(__i386__) -#define PRIiMAX "lli" /* intmax_t */ -#else -#define PRIiMAX "ji" /* intmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIiPTR "i" /* intptr_t */ -#else -#define PRIiPTR "li" /* intptr_t */ -#endif - -/* fprintf macros for unsigned integers */ -#define PRIo8 "o" /* int8_t */ -#define PRIo16 "o" /* int16_t */ -#define PRIo32 "o" /* int32_t */ -#ifdef __x86_64__ -#define PRIo64 "lo" /* int64_t */ -#else -#define PRIo64 "llo" /* int64_t */ -#endif - -#define PRIoLEAST8 "o" /* int_least8_t */ -#define PRIoLEAST16 "o" /* int_least16_t */ -#define PRIoLEAST32 "o" /* int_least32_t */ -#ifdef __x86_64__ -#define PRIoLEAST64 "lo" /* int_least64_t */ -#else -#define PRIoLEAST64 "llo" /* int_least64_t */ -#endif - -#define PRIoFAST8 "o" /* int_fast8_t */ -#ifdef __x86_64__ -#define PRIoFAST16 "lo" /* int_fast16_t */ -#define PRIoFAST32 "lo" /* int_fast32_t */ -#define PRIoFAST64 "lo" /* int_fast64_t */ -#else -#define PRIoFAST16 "o" /* int_fast16_t */ -#define PRIoFAST32 "o" /* int_fast32_t */ -#define PRIoFAST64 "llo" /* int_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIoMAX "lo" /* intmax_t */ -#else -#if defined(__i386__) -#define PRIoMAX "llo" /* intmax_t */ -#else -#define PRIoMAX "jo" /* intmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIoPTR "o" /* intptr_t */ -#else -#define PRIoPTR "lo" /* intptr_t */ -#endif - -#define PRIu8 "u" /* uint8_t */ -#define PRIu16 "u" /* uint16_t */ -#define PRIu32 "u" /* uint32_t */ - -#ifdef __x86_64__ -#define PRIu64 "lu" /* uint64_t */ -#else -#define PRIu64 "llu" /* uint64_t */ -#endif - -#define PRIuLEAST8 "u" /* uint_least8_t */ -#define PRIuLEAST16 "u" /* uint_least16_t */ -#define PRIuLEAST32 "u" /* uint_least32_t */ - -#ifdef __x86_64__ -#define PRIuLEAST64 "lu" /* uint_least64_t */ -#else -#define PRIuLEAST64 "llu" /* uint_least64_t */ -#endif - -#define PRIuFAST8 "u" /* uint_fast8_t */ - -#ifdef __x86_64__ -#define PRIuFAST16 "lu" /* uint_fast16_t */ -#define PRIuFAST32 "lu" /* uint_fast32_t */ -#define PRIuFAST64 "lu" /* uint_fast64_t */ -#else -#define PRIuFAST16 "u" /* uint_fast16_t */ -#define PRIuFAST32 "u" /* uint_fast32_t */ -#define PRIuFAST64 "llu" /* uint_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIuMAX "lu" /* uintmax_t */ -#else -#if defined(__i386__) -#define PRIuMAX "llu" /* uintmax_t */ -#else -#define PRIuMAX "ju" /* uintmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIuPTR "u" /* uintptr_t */ -#else -#define PRIuPTR "lu" /* uintptr_t */ -#endif - -#define PRIx8 "x" /* uint8_t */ -#define PRIx16 "x" /* uint16_t */ -#define PRIx32 "x" /* uint32_t */ -#ifdef __x86_64__ -#define PRIx64 "lx" /* uint64_t */ -#else -#define PRIx64 "llx" /* uint64_t */ -#endif - -#define PRIxLEAST8 "x" /* uint_least8_t */ -#define PRIxLEAST16 "x" /* uint_least16_t */ -#define PRIxLEAST32 "x" /* uint_least32_t */ -#ifdef __x86_64__ -#define PRIxLEAST64 "lx" /* uint_least64_t */ -#else -#define PRIxLEAST64 "llx" /* uint_least64_t */ -#endif - -#define PRIxFAST8 "x" /* uint_fast8_t */ -#ifdef __x86_64__ -#define PRIxFAST16 "lx" /* uint_fast16_t */ -#define PRIxFAST32 "lx" /* uint_fast32_t */ -#define PRIxFAST64 "lx" /* uint_fast64_t */ -#else -#define PRIxFAST16 "x" /* uint_fast16_t */ -#define PRIxFAST32 "x" /* uint_fast32_t */ -#define PRIxFAST64 "llx" /* uint_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIxMAX "lx" /* uintmax_t */ -#else -#if defined(__i386__) -#define PRIxMAX "llx" /* uintmax_t */ -#else -#define PRIxMAX "jx" /* uintmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIxPTR "x" /* uintptr_t */ -#else -#define PRIxPTR "lx" /* uintptr_t */ -#endif - -#define PRIX8 "X" /* uint8_t */ -#define PRIX16 "X" /* uint16_t */ -#define PRIX32 "X" /* uint32_t */ - -#ifdef __x86_64__ -#define PRIX64 "lX" /* uint64_t */ -#else -#define PRIX64 "llX" /* uint64_t */ -#endif - -#define PRIXLEAST8 "X" /* uint_least8_t */ -#define PRIXLEAST16 "X" /* uint_least16_t */ -#define PRIXLEAST32 "X" /* uint_least32_t */ -#ifdef __x86_64__ -#define PRIXLEAST64 "lX" /* uint_least64_t */ -#else -#define PRIXLEAST64 "llX" /* uint_least64_t */ -#endif - -#define PRIXFAST8 "X" /* uint_fast8_t */ -#ifdef __x86_64__ -#define PRIXFAST16 "lX" /* uint_fast16_t */ -#define PRIXFAST32 "lX" /* uint_fast32_t */ -#define PRIXFAST64 "lX" /* uint_fast64_t */ -#else -#define PRIXFAST16 "X" /* uint_fast16_t */ -#define PRIXFAST32 "X" /* uint_fast32_t */ -#define PRIXFAST64 "llX" /* uint_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIXMAX "lX" /* uintmax_t */ -#else -#if defined(__i386__) -#define PRIXMAX "llX" /* uintmax_t */ -#else -#define PRIXMAX "jX" /* uintmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIXPTR "X" /* uintptr_t */ -#else -#define PRIXPTR "lX" /* uintptr_t */ -#endif - -typedef struct { - intmax_t quot; /* quotient */ - intmax_t rem; /* remainder */ -} imaxdiv_t; - -__BEGIN_DECLS - -intmax_t _TLIBC_CDECL_ imaxabs(intmax_t); -imaxdiv_t _TLIBC_CDECL_ imaxdiv(intmax_t, intmax_t); -intmax_t _TLIBC_CDECL_ strtoimax(const char *, char **, int); -uintmax_t _TLIBC_CDECL_ strtoumax(const char *, char **, int); - -__END_DECLS - -#endif /* _INTTYPES_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/iso646.h b/e2e/rust-sgx-sdk/common/inc/iso646.h deleted file mode 100644 index a0c341b..0000000 --- a/e2e/rust-sgx-sdk/common/inc/iso646.h +++ /dev/null @@ -1,26 +0,0 @@ -/* $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. - * Public domain. - */ - -#ifndef _ISO646_H_ -#define _ISO646_H_ - -#ifndef __cplusplus -#define and && -#define and_eq &= -#define bitand & -#define bitor | -#define compl ~ -#define not ! -#define not_eq != -#define or || -#define or_eq |= -#define xor ^ -#define xor_eq ^= -#endif - -#endif /* !_ISO646_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/limits.h b/e2e/rust-sgx-sdk/common/inc/limits.h deleted file mode 100644 index 9d42cb5..0000000 --- a/e2e/rust-sgx-sdk/common/inc/limits.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $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. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)limits.h 5.9 (Berkeley) 4/3/91 - */ - - -#ifndef _LIMITS_H_ -#define _LIMITS_H_ - -#include - -#endif /* !_LIMITS_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/math.h b/e2e/rust-sgx-sdk/common/inc/math.h deleted file mode 100644 index 6ea425b..0000000 --- a/e2e/rust-sgx-sdk/common/inc/math.h +++ /dev/null @@ -1,430 +0,0 @@ -/* $OpenBSD: math.h,v 1.27 2010/12/14 11:16:15 martynas Exp $ */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * from: @(#)fdlibm.h 5.1 93/09/24 - */ - -#ifndef _MATH_H_ -#define _MATH_H_ - -#include -#include -#include - -#include - -typedef __float_t float_t; -typedef __double_t double_t; - -#define FP_NAN 0x00 -#define FP_INFINITE 0x01 -#define FP_ZERO 0x02 -#define FP_SUBNORMAL 0x03 -#define FP_NORMAL 0x04 - -#define FP_ILOGB0 (-INT_MAX - 1) -#define FP_ILOGBNAN (-INT_MAX - 1) - -#define fpclassify(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __fpclassifyf(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __fpclassify(x) \ - : __fpclassifyl(x)) -#define isfinite(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __isfinitef(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __isfinite(x) \ - : __isfinitel(x)) -#define isnormal(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __isnormalf(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __isnormal(x) \ - : __isnormall(x)) -#define signbit(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __signbitf(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __signbit(x) \ - : __signbitl(x)) -#define isinf(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __isinff(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __isinf(x) \ - : __isinfl(x)) -#define isnan(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __isnanf(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __isnan(x) \ - : __isnanl(x)) - -#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y)) -#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y)) -#define isless(x, y) (!isunordered((x), (y)) && (x) < (y)) -#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y)) -#define islessgreater(x, y) (!isunordered((x), (y)) && ((x) > (y) || (y) > (x))) -#define isunordered(x, y) (isnan(x) || isnan(y)) - -__BEGIN_DECLS - -extern char __infinity[]; -#define HUGE_VAL (*(double *)(void *)__infinity) -#define HUGE_VALF ((float)HUGE_VAL) -#define HUGE_VALL ((long double)HUGE_VAL) -#define INFINITY HUGE_VALF -extern char __nan[]; -#define NAN (*(float *)(void *)__nan) - -/* - * ANSI/POSIX - */ -double _TLIBC_CDECL_ acos(double); -double _TLIBC_CDECL_ asin(double); -double _TLIBC_CDECL_ atan(double); -double _TLIBC_CDECL_ atan2(double, double); -double _TLIBC_CDECL_ cos(double); -double _TLIBC_CDECL_ sin(double); -double _TLIBC_CDECL_ tan(double); - -double _TLIBC_CDECL_ cosh(double); -double _TLIBC_CDECL_ sinh(double); -double _TLIBC_CDECL_ tanh(double); - -double _TLIBC_CDECL_ exp(double); -double _TLIBC_CDECL_ frexp(double, int *); -double _TLIBC_CDECL_ ldexp(double, int); -double _TLIBC_CDECL_ log(double); -double _TLIBC_CDECL_ log10(double); -double _TLIBC_CDECL_ modf(double, double *); - -double _TLIBC_CDECL_ pow(double, double); -double _TLIBC_CDECL_ sqrt(double); - -double _TLIBC_CDECL_ ceil(double); -double _TLIBC_CDECL_ fabs(double); -double _TLIBC_CDECL_ floor(double); -double _TLIBC_CDECL_ fmod(double, double); - -/* - * C99 - */ -double _TLIBC_CDECL_ acosh(double); -double _TLIBC_CDECL_ asinh(double); -double _TLIBC_CDECL_ atanh(double); - -double _TLIBC_CDECL_ exp2(double); -double _TLIBC_CDECL_ expm1(double); -int _TLIBC_CDECL_ ilogb(double); -double _TLIBC_CDECL_ log1p(double); -double _TLIBC_CDECL_ log2(double); -double _TLIBC_CDECL_ logb(double); -double _TLIBC_CDECL_ scalbn(double, int); -double _TLIBC_CDECL_ scalbln(double, long int); - -double _TLIBC_CDECL_ cbrt(double); -double _TLIBC_CDECL_ hypot(double, double); - -double _TLIBC_CDECL_ erf(double); -double _TLIBC_CDECL_ erfc(double); -double _TLIBC_CDECL_ lgamma(double); -double _TLIBC_CDECL_ tgamma(double); - -double _TLIBC_CDECL_ nearbyint(double); -double _TLIBC_CDECL_ rint(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); -long long int _TLIBC_CDECL_ llround(double); -double _TLIBC_CDECL_ trunc(double); - -double _TLIBC_CDECL_ remainder(double, double); -double _TLIBC_CDECL_ remquo(double, double, int *); - -double _TLIBC_CDECL_ copysign(double, double); -double _TLIBC_CDECL_ nan(const char *); -double _TLIBC_CDECL_ nextafter(double, double); - -double _TLIBC_CDECL_ fdim(double, double); -double _TLIBC_CDECL_ fmax(double, double); -double _TLIBC_CDECL_ fmin(double, double); - -double _TLIBC_CDECL_ fma(double, double, double); - -/* - * Float versions of C99 functions - */ - -float _TLIBC_CDECL_ acosf(float); -float _TLIBC_CDECL_ asinf(float); -float _TLIBC_CDECL_ atanf(float); -float _TLIBC_CDECL_ atan2f(float, float); -float _TLIBC_CDECL_ cosf(float); -float _TLIBC_CDECL_ sinf(float); -float _TLIBC_CDECL_ tanf(float); - -float _TLIBC_CDECL_ acoshf(float); -float _TLIBC_CDECL_ asinhf(float); -float _TLIBC_CDECL_ atanhf(float); -float _TLIBC_CDECL_ coshf(float); -float _TLIBC_CDECL_ sinhf(float); -float _TLIBC_CDECL_ tanhf(float); - -float _TLIBC_CDECL_ expf(float); -float _TLIBC_CDECL_ exp2f(float); -float _TLIBC_CDECL_ expm1f(float); -float _TLIBC_CDECL_ frexpf(float, int *); -int _TLIBC_CDECL_ ilogbf(float); -float _TLIBC_CDECL_ ldexpf(float, int); -float _TLIBC_CDECL_ logf(float); -float _TLIBC_CDECL_ log10f(float); -float _TLIBC_CDECL_ log1pf(float); -float _TLIBC_CDECL_ log2f(float); -float _TLIBC_CDECL_ logbf(float); -float _TLIBC_CDECL_ modff(float, float *); -float _TLIBC_CDECL_ scalbnf(float, int); -float _TLIBC_CDECL_ scalblnf(float, long int); - -float _TLIBC_CDECL_ cbrtf(float); -float _TLIBC_CDECL_ fabsf(float); -float _TLIBC_CDECL_ hypotf(float, float); -float _TLIBC_CDECL_ powf(float, float); -float _TLIBC_CDECL_ sqrtf(float); - -float _TLIBC_CDECL_ erff(float); -float _TLIBC_CDECL_ erfcf(float); -float _TLIBC_CDECL_ lgammaf(float); -float _TLIBC_CDECL_ tgammaf(float); - -float _TLIBC_CDECL_ ceilf(float); -float _TLIBC_CDECL_ floorf(float); -float _TLIBC_CDECL_ nearbyintf(float); - -float _TLIBC_CDECL_ rintf(float); -long int _TLIBC_CDECL_ lrintf(float); -long long int _TLIBC_CDECL_ llrintf(float); -float _TLIBC_CDECL_ roundf(float); -long int _TLIBC_CDECL_ lroundf(float); -long long int _TLIBC_CDECL_ llroundf(float); -float _TLIBC_CDECL_ truncf(float); - -float _TLIBC_CDECL_ fmodf(float, float); -float _TLIBC_CDECL_ remainderf(float, float); -float _TLIBC_CDECL_ remquof(float, float, int *); - -float _TLIBC_CDECL_ copysignf(float, float); -float _TLIBC_CDECL_ nanf(const char *); -float _TLIBC_CDECL_ nextafterf(float, float); - -float _TLIBC_CDECL_ fdimf(float, float); -float _TLIBC_CDECL_ fmaxf(float, float); -float _TLIBC_CDECL_ fminf(float, float); - -float _TLIBC_CDECL_ fmaf(float, float, float); - -/* - * Long double versions of C99 functions - */ - -/* Macros defining long double functions to be their double counterparts - * (long double is synonymous with double in this implementation). - */ - -long double _TLIBC_CDECL_ acosl(long double); -long double _TLIBC_CDECL_ asinl(long double); -long double _TLIBC_CDECL_ atanl(long double); -long double _TLIBC_CDECL_ atan2l(long double, long double); -long double _TLIBC_CDECL_ cosl(long double); -long double _TLIBC_CDECL_ sinl(long double); -long double _TLIBC_CDECL_ tanl(long double); - -long double _TLIBC_CDECL_ acoshl(long double); -long double _TLIBC_CDECL_ asinhl(long double); -long double _TLIBC_CDECL_ atanhl(long double); -long double _TLIBC_CDECL_ coshl(long double); -long double _TLIBC_CDECL_ sinhl(long double); -long double _TLIBC_CDECL_ tanhl(long double); - -long double _TLIBC_CDECL_ expl(long double); -long double _TLIBC_CDECL_ exp2l(long double); -long double _TLIBC_CDECL_ expm1l(long double); -long double _TLIBC_CDECL_ frexpl(long double, int *); -int _TLIBC_CDECL_ ilogbl(long double); -long double _TLIBC_CDECL_ ldexpl(long double, int); -long double _TLIBC_CDECL_ logl(long double); -long double _TLIBC_CDECL_ log10l(long double); -long double _TLIBC_CDECL_ log1pl(long double); -long double _TLIBC_CDECL_ log2l(long double); -long double _TLIBC_CDECL_ logbl(long double); -long double _TLIBC_CDECL_ modfl(long double, long double *); -long double _TLIBC_CDECL_ scalbnl(long double, int); -long double _TLIBC_CDECL_ scalblnl(long double, long int); - -long double _TLIBC_CDECL_ cbrtl(long double); -long double _TLIBC_CDECL_ fabsl(long double); -long double _TLIBC_CDECL_ hypotl(long double, long double); -long double _TLIBC_CDECL_ powl(long double, long double); -long double _TLIBC_CDECL_ sqrtl(long double); - -long double _TLIBC_CDECL_ erfl(long double); -long double _TLIBC_CDECL_ erfcl(long double); -long double _TLIBC_CDECL_ lgammal(long double); -long double _TLIBC_CDECL_ tgammal(long double); - -long double _TLIBC_CDECL_ ceill(long double); -long double _TLIBC_CDECL_ floorl(long double); -long double _TLIBC_CDECL_ nearbyintl(long double); -long double _TLIBC_CDECL_ rintl(long double); -long int _TLIBC_CDECL_ lrintl(long double); -long long int _TLIBC_CDECL_ llrintl(long double); -long double _TLIBC_CDECL_ roundl(long double); -long int _TLIBC_CDECL_ lroundl(long double); -long long int _TLIBC_CDECL_ llroundl(long double); -long double _TLIBC_CDECL_ truncl(long double); - -long double _TLIBC_CDECL_ fmodl(long double, long double); -long double _TLIBC_CDECL_ remainderl(long double, long double); -long double _TLIBC_CDECL_ remquol(long double, long double, int *); - -long double _TLIBC_CDECL_ copysignl(long double, long double); -long double _TLIBC_CDECL_ nanl(const char *); -long double _TLIBC_CDECL_ nextafterl(long double, long double); - -long double _TLIBC_CDECL_ fdiml(long double, long double); -long double _TLIBC_CDECL_ fmaxl(long double, long double); -long double _TLIBC_CDECL_ fminl(long double, long double); -long double _TLIBC_CDECL_ fmal(long double, long double, long double); - -/* nexttoward(): -* The implementation in Intel math library is incompatible with MSVC. -* Because sizeof(long double) is 8bytes with MSVC, -* but the expected long double size is 10bytes. -* And by default, MSVC doesn't provide nexttoward(). -* So we only provide Linux version here. -*/ -double _TLIBC_CDECL_ nexttoward(double, long double); -float _TLIBC_CDECL_ nexttowardf(float, long double); - -long double _TLIBC_CDECL_ nexttowardl(long double, long double); - -/* - * Library implementation - */ -int _TLIBC_CDECL_ __fpclassify(double); -int _TLIBC_CDECL_ __fpclassifyf(float); -int _TLIBC_CDECL_ __isfinite(double); -int _TLIBC_CDECL_ __isfinitef(float); -int _TLIBC_CDECL_ __isinf(double); -int _TLIBC_CDECL_ __isinff(float); -int _TLIBC_CDECL_ __isnan(double); -int _TLIBC_CDECL_ __isnanf(float); -int _TLIBC_CDECL_ __isnormal(double); -int _TLIBC_CDECL_ __isnormalf(float); -int _TLIBC_CDECL_ __signbit(double); -int _TLIBC_CDECL_ __signbitf(float); - -int _TLIBC_CDECL_ __fpclassifyl(long double); -int _TLIBC_CDECL_ __isfinitel(long double); -int _TLIBC_CDECL_ __isinfl(long double); -int _TLIBC_CDECL_ __isnanl(long double); -int _TLIBC_CDECL_ __isnormall(long double); -int _TLIBC_CDECL_ __signbitl(long double); - -/* - * Non-C99 functions. - */ -double _TLIBC_CDECL_ drem(double, double); -double _TLIBC_CDECL_ exp10(double); -double _TLIBC_CDECL_ gamma(double); -double _TLIBC_CDECL_ gamma_r(double, int *); -double _TLIBC_CDECL_ j0(double); -double _TLIBC_CDECL_ j1(double); -double _TLIBC_CDECL_ jn(int, double); -double _TLIBC_CDECL_ lgamma_r(double, int *); -double _TLIBC_CDECL_ pow10(double); -double _TLIBC_CDECL_ scalb(double, double); -/* C99 Macro signbit.*/ -double _TLIBC_CDECL_ significand(double); -void _TLIBC_CDECL_ sincos(double, double *, double *); -double _TLIBC_CDECL_ y0(double); -double _TLIBC_CDECL_ y1(double); -double _TLIBC_CDECL_ yn(int, double); -/* C99 Macro isinf.*/ -/* C99 Macro isnan.*/ -int _TLIBC_CDECL_ finite(double); - -float _TLIBC_CDECL_ dremf(float, float); -float _TLIBC_CDECL_ exp10f(float); -float _TLIBC_CDECL_ gammaf(float); -float _TLIBC_CDECL_ gammaf_r(float, int *); -float _TLIBC_CDECL_ j0f(float); -float _TLIBC_CDECL_ j1f(float); -float _TLIBC_CDECL_ jnf(int, float); -float _TLIBC_CDECL_ lgammaf_r(float, int *); -float _TLIBC_CDECL_ pow10f(float); -float _TLIBC_CDECL_ scalbf(float, float); -int _TLIBC_CDECL_ signbitf(float); -float _TLIBC_CDECL_ significandf(float); -void _TLIBC_CDECL_ sincosf(float, float *, float *); -float _TLIBC_CDECL_ y0f(float); -float _TLIBC_CDECL_ y1f(float); -float _TLIBC_CDECL_ ynf(int, float); -int _TLIBC_CDECL_ finitef(float); -int _TLIBC_CDECL_ isinff(float); -int _TLIBC_CDECL_ isnanf(float); - -long double _TLIBC_CDECL_ dreml(long double, long double); -long double _TLIBC_CDECL_ exp10l(long double); -long double _TLIBC_CDECL_ gammal(long double); -long double _TLIBC_CDECL_ gammal_r(long double, int *); -long double _TLIBC_CDECL_ j0l(long double); -long double _TLIBC_CDECL_ j1l(long double); -long double _TLIBC_CDECL_ jnl(int, long double); -long double _TLIBC_CDECL_ lgammal_r(long double, int *); -long double _TLIBC_CDECL_ pow10l(long double); -long double _TLIBC_CDECL_ scalbl(long double, long double); -int _TLIBC_CDECL_ signbitl(long double); -long double _TLIBC_CDECL_ significandl(long double); -void _TLIBC_CDECL_ sincosl(long double, long double *, long double *); -long double _TLIBC_CDECL_ y1l(long double); -long double _TLIBC_CDECL_ y0l(long double); -long double _TLIBC_CDECL_ ynl(int, long double); -int _TLIBC_CDECL_ finitel(long double); -int _TLIBC_CDECL_ isinfl(long double); -int _TLIBC_CDECL_ isnanl(long double); - -/* - * TODO: From Intel Decimal Floating-Point Math Library - * signbitd32/signbitd64/signbitd128, finited32/finited64/finited128 - * isinfd32/isinfd64/isinfd128, isnand32/isnand64/isnand128 - */ -#if defined(__cplusplus) -/* Clang does not support decimal floating point types. - * - * c.f.: - * http://clang.llvm.org/docs/UsersManual.html#gcc-extensions-not-implemented-yet - */ -#if !defined(__clang__) -typedef float _Decimal32 __attribute__((mode(SD))); -typedef float _Decimal64 __attribute__((mode(DD))); -typedef float _Decimal128 __attribute__((mode(TD))); -#endif -#endif - -__END_DECLS - -#endif /* !_MATH_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/mbusafecrt.h b/e2e/rust-sgx-sdk/common/inc/mbusafecrt.h deleted file mode 100644 index 91d888b..0000000 --- a/e2e/rust-sgx-sdk/common/inc/mbusafecrt.h +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -/*** -* mbusafecrt.h - public declarations for SafeCRT lib -* - -* -* Purpose: -* This file contains the public declarations SafeCRT -* functions ported to MacOS. These are the safe versions of -* functions standard functions banned by SWI -* - -****/ - -/* shields! */ - -#ifndef MBUSAFECRT_H -#define MBUSAFECRT_H -#include -#include -#include -typedef wchar_t WCHAR; - -#ifdef __cplusplus - extern "C" { -#endif - -extern errno_t strcat_s( char* ioDest, size_t inDestBufferSize, const char* inSrc ); -extern errno_t wcscat_s( WCHAR* ioDest, size_t inDestBufferSize, const WCHAR* inSrc ); - -extern errno_t strncat_s( char* ioDest, size_t inDestBufferSize, const char* inSrc, size_t inCount ); -extern errno_t wcsncat_s( WCHAR* ioDest, size_t inDestBufferSize, const WCHAR* inSrc, size_t inCount ); - -extern errno_t strcpy_s( char* outDest, size_t inDestBufferSize, const char* inSrc ); -extern errno_t wcscpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inSrc ); - -extern errno_t strncpy_s( char* outDest, size_t inDestBufferSize, const char* inSrc, size_t inCount ); -extern errno_t wcsncpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inSrc, size_t inCount ); - -extern char* strtok_s( char* inString, const char* inControl, char** ioContext ); -extern WCHAR* wcstok_s( WCHAR* inString, const WCHAR* inControl, WCHAR** ioContext ); - -extern size_t wcsnlen( const WCHAR* inString, size_t inMaxSize ); - -extern errno_t _itoa_s( int inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _itow_s( int inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern errno_t _ltoa_s( long inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _ltow_s( long inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern errno_t _ultoa_s( unsigned long inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _ultow_s( unsigned long inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern errno_t _i64toa_s( long long inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _i64tow_s( long long inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern errno_t _ui64toa_s( unsigned long long inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _ui64tow_s( unsigned long long inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern int sprintf_s( char *string, size_t sizeInBytes, const char *format, ... ); -extern int swprintf_s( WCHAR *string, size_t sizeInWords, const WCHAR *format, ... ); - -extern int _snprintf_s( char *string, size_t sizeInBytes, size_t count, const char *format, ... ); -extern int _snwprintf_s( WCHAR *string, size_t sizeInWords, size_t count, const WCHAR *format, ... ); - -extern int _vsprintf_s( char* string, size_t sizeInBytes, const char* format, va_list arglist ); -extern int _vsnprintf_s( char* string, size_t sizeInBytes, size_t count, const char* format, va_list arglist ); - -extern int _vswprintf_s( WCHAR* string, size_t sizeInWords, const WCHAR* format, va_list arglist ); -extern int _vsnwprintf_s( WCHAR* string, size_t sizeInWords, size_t count, const WCHAR* format, va_list arglist ); - -extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count ); -extern errno_t memcpy_verw_s( void * dst, size_t sizeInBytes, const void * src, size_t count ); -extern errno_t memmove_s( void * dst, size_t sizeInBytes, const void * src, size_t count ); -extern errno_t memmove_verw_s( void * dst, size_t sizeInBytes, const void * src, size_t count ); - -#ifdef __cplusplus - } -#endif - -#endif /* MBUSAFECRT_H */ diff --git a/e2e/rust-sgx-sdk/common/inc/netdb.h b/e2e/rust-sgx-sdk/common/inc/netdb.h deleted file mode 100644 index 264f90f..0000000 --- a/e2e/rust-sgx-sdk/common/inc/netdb.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license.s -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _NETDB_H -#define _NETDB_H - -struct addrinfo { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - socklen_t ai_addrlen; - struct sockaddr *ai_addr; - char *ai_canonname; - struct addrinfo *ai_next; -}; - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/poll.h b/e2e/rust-sgx-sdk/common/inc/poll.h deleted file mode 100644 index fc786fc..0000000 --- a/e2e/rust-sgx-sdk/common/inc/poll.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license. -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _POLL_H_ -#define _POLL_H_ - -typedef unsigned long nfds_t; - -struct pollfd { - int fd; - short int events; - short int revents; -}; - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/pwd.h b/e2e/rust-sgx-sdk/common/inc/pwd.h deleted file mode 100644 index a45b145..0000000 --- a/e2e/rust-sgx-sdk/common/inc/pwd.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license. -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _PWD_H -#define _PWD_H - -struct passwd { - char *pw_name; - char *pw_passwd; - __uid_t pw_uid; - __gid_t pw_gid; - char *pw_gecos; - char *pw_dir; - char *pw_shell; -}; - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/sched.h b/e2e/rust-sgx-sdk/common/inc/sched.h deleted file mode 100644 index 4d237c4..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sched.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license.s -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _SCHED_H -#define _SCHED_H -#include - -typedef struct { - unsigned long __bits[128/sizeof(long)]; -} cpu_set_t; - -#define __CPU_op_S(i, size, set, op) ( (i)/8U >= (size) ? 0 : \ - (((unsigned long *)(set))[(i)/8/sizeof(long)] op (1UL<<((i)%(8*sizeof(long))))) ) - -#define CPU_SET_S(i, size, set) __CPU_op_S(i, size, set, |=) -#define CPU_CLR_S(i, size, set) __CPU_op_S(i, size, set, &=~) -#define CPU_ISSET_S(i, size, set) __CPU_op_S(i, size, set, &) - -#define __CPU_op_func_S(func, op) \ -static __inline void __CPU_##func##_S(size_t __size, cpu_set_t *__dest, \ - const cpu_set_t *__src1, const cpu_set_t *__src2) \ -{ \ - size_t __i; \ - for (__i=0; __i<__size/sizeof(long); __i++) \ - ((unsigned long *)__dest)[__i] = ((unsigned long *)__src1)[__i] \ - op ((unsigned long *)__src2)[__i] ; \ -} - -__CPU_op_func_S(AND, &) -__CPU_op_func_S(OR, |) -__CPU_op_func_S(XOR, ^) - -#define CPU_AND_S(a,b,c,d) __CPU_AND_S(a,b,c,d) -#define CPU_OR_S(a,b,c,d) __CPU_OR_S(a,b,c,d) -#define CPU_XOR_S(a,b,c,d) __CPU_XOR_S(a,b,c,d) - -typedef __pid_t pid_t; - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/setjmp.h b/e2e/rust-sgx-sdk/common/inc/setjmp.h deleted file mode 100644 index 752f0cf..0000000 --- a/e2e/rust-sgx-sdk/common/inc/setjmp.h +++ /dev/null @@ -1,65 +0,0 @@ -/* $NetBSD: setjmp.h,v 1.26 2011/11/05 09:27:06 joerg Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)setjmp.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _SETJMP_H_ -#define _SETJMP_H_ - -#ifndef _JB_ATTRIBUTES -#define _JB_ATTRIBUTES /**/ -#else -#endif -#ifndef _BSD_JBSLOT_T_ -#define _BSD_JBSLOT_T_ long -#endif - -#define _JBLEN 8 - -typedef _BSD_JBSLOT_T_ jmp_buf[_JBLEN] _JB_ATTRIBUTES; - -#include -#define __returns_twice __attribute__((__returns_twice__)) -#define __dead - - -__BEGIN_DECLS -int setjmp(jmp_buf) __returns_twice; -void longjmp(jmp_buf, int) __dead; -__END_DECLS - -#endif /* !_SETJMP_H_ */ - diff --git a/e2e/rust-sgx-sdk/common/inc/signal.h b/e2e/rust-sgx-sdk/common/inc/signal.h deleted file mode 100644 index c0da74f..0000000 --- a/e2e/rust-sgx-sdk/common/inc/signal.h +++ /dev/null @@ -1,104 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license.s -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _SIGNAL_H -#define _SIGNAL_H - -#include - -typedef struct { - unsigned long _bits[128/sizeof(long)]; -} __sigset_t; - -typedef __sigset_t sigset_t; - -union sigval { - int sival_int; - void *sival_ptr; -}; - -typedef struct { - int si_signo; - int si_errno; - int si_code; - union { - char __pad[128 - 2*sizeof(int) - sizeof(long)]; - struct { - union { - struct { - __pid_t si_pid; - __uid_t si_uid; - } __piduid; - struct { - int si_timerid; - int si_overrun; - } __timer; - } __first; - union { - union sigval si_value; - struct { - int si_status; - __clock_t si_utime, si_stime; - } __sigchld; - } __second; - } __si_common; - struct { - void *si_addr; - short si_addr_lsb; - union { - struct { - void *si_lower; - void *si_upper; - } __addr_bnd; - unsigned si_pkey; - } __first; - } __sigfault; - struct { - long si_band; - int si_fd; - } __sigpoll; - struct { - void *si_call_addr; - int si_syscall; - unsigned si_arch; - } __sigsys; - } __si_fields; -} siginfo_t; - -struct sigaction { - union { - void (*sa_handler) (int); - void (*sa_sigaction) (int, siginfo_t *, void *); - } __sa_handler; - __sigset_t sa_mask; - int sa_flags; - void (*sa_restorer) (void); -}; - -#define sa_handler __sa_handler.sa_handler -#define sa_sigaction __sa_handler.sa_sigaction - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/stdarg.h b/e2e/rust-sgx-sdk/common/inc/stdarg.h deleted file mode 100644 index b2a5d36..0000000 --- a/e2e/rust-sgx-sdk/common/inc/stdarg.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $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 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 - */ - -#ifndef _STDARG_H_ -#define _STDARG_H_ - -#include -#include - -typedef __va_list va_list; - -#define va_start(ap, last) __builtin_va_start((ap), last) -#define va_end __builtin_va_end -#define va_arg __builtin_va_arg -#define va_copy(dst, src) __builtin_va_copy((dst),(src)) - -#endif /* !_STDARG_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/stdbool.h b/e2e/rust-sgx-sdk/common/inc/stdbool.h deleted file mode 100644 index 86b866d..0000000 --- a/e2e/rust-sgx-sdk/common/inc/stdbool.h +++ /dev/null @@ -1,44 +0,0 @@ -/* $OpenBSD: stdbool.h,v 1.5 2010/07/24 22:17:03 guenther Exp $ */ - -/* - * Written by Marc Espie, September 25, 1999 - * Public domain. - */ - -#ifndef _STDBOOL_H_ -#define _STDBOOL_H_ - -#ifndef __cplusplus - -#ifndef __GNUC__ -/* Support for _C99: type _Bool is already built-in. */ -/* `_Bool' type must promote to `int' or `unsigned int'. */ -typedef enum { - false = 0, - true = 1 -} _Bool; - -/* And those constants must also be available as macros. */ -# define false false -# define true true -#else /* __GNUC__ */ -# define false 0 -# define true 1 -#endif - -/* User visible type `bool' is provided as a macro which may be redefined */ -#define bool _Bool - -#else /* __cplusplus */ - -# define _Bool bool -# define bool bool -# define false false -# define true true - -#endif - -/* Inform that everything is fine */ -#define __bool_true_false_are_defined 1 - -#endif /* _STDBOOL_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/stddef.h b/e2e/rust-sgx-sdk/common/inc/stddef.h deleted file mode 100644 index c132882..0000000 --- a/e2e/rust-sgx-sdk/common/inc/stddef.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $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. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)stddef.h 5.5 (Berkeley) 4/3/91 - */ - -#ifndef _STDDEF_H_ -#define _STDDEF_H_ - -#include -#include - -#ifndef _PTRDIFF_T_DEFINED_ -#define _PTRDIFF_T_DEFINED_ -typedef __ptrdiff_t ptrdiff_t; -#endif - -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef __size_t size_t; -#endif - -#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus) -#define _WCHAR_T_DEFINED_ -#ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ int -#endif -typedef __WCHAR_TYPE__ wchar_t; -#endif - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#define offsetof(type, member) ((size_t)(&((type *)0)->member)) - -#endif /* _STDDEF_H_ */ - diff --git a/e2e/rust-sgx-sdk/common/inc/stdint.h b/e2e/rust-sgx-sdk/common/inc/stdint.h deleted file mode 100644 index e574484..0000000 --- a/e2e/rust-sgx-sdk/common/inc/stdint.h +++ /dev/null @@ -1,24 +0,0 @@ -/* $OpenBSD: stdint.h,v 1.4 2006/12/10 22:17:55 deraadt Exp $ */ - -/* - * Copyright (c) 1997, 2005 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _STDINT_H_ -#define _STDINT_H_ - -#include - -#endif /* _STDINT_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/stdio.h b/e2e/rust-sgx-sdk/common/inc/stdio.h deleted file mode 100644 index 92d01a0..0000000 --- a/e2e/rust-sgx-sdk/common/inc/stdio.h +++ /dev/null @@ -1,95 +0,0 @@ -/* $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. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)stdio.h 5.17 (Berkeley) 6/3/91 - */ - -#ifndef _STDIO_H_ -#define _STDIO_H_ - -#include -#include - -#include - -#ifndef _SIZE_T_DEFINED_ -typedef __size_t size_t; -#define _SIZE_T_DEFINED_ -#endif - -#ifndef NULL -# ifdef __cplusplus -# define NULL 0 -# else -# define NULL ((void *)0) -# endif -#endif - -# define BUFSIZ 8192 - -#define EOF (-1) - -__BEGIN_DECLS - -int _TLIBC_CDECL_ snprintf(char *, size_t, const char *, ...) _GCC_PRINTF_FORMAT_(3, 4); -int _TLIBC_CDECL_ vsnprintf(char *, size_t, const char *, __va_list) _GCC_PRINTF_FORMAT_(3, 0); - -/* - * Deprecated definitions. - */ -#if 0 /* No FILE */ -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, fprintf, FILE *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, putc, int, FILE *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, fputc, int, FILE *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, fputs, const char *, FILE *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, fscanf, FILE *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(size_t _TLIBC_CDECL_, fwrite, const void *, size_t, size_t, FILE *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, printf, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, putchar, int); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, puts, const char *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, scanf, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, sprintf, char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, sscanf, const char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vfprintf, FILE *, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vfscanf, FILE *, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vprintf, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vscanf, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vsprintf, char *, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vsscanf, const char *, const char *, __va_list); -#endif - -__END_DECLS - - -#endif /* !_STDIO_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/stdlib.h b/e2e/rust-sgx-sdk/common/inc/stdlib.h deleted file mode 100644 index e5b6365..0000000 --- a/e2e/rust-sgx-sdk/common/inc/stdlib.h +++ /dev/null @@ -1,153 +0,0 @@ -/* $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. -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* 1. Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* 2. 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. -* 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. -* -* @(#)stdlib.h 5.13 (Berkeley) 6/4/91 -*/ - -#ifndef _STDLIB_H_ -#define _STDLIB_H_ - -#include -#include - -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef __size_t size_t; -#endif - -#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus) -#define _WCHAR_T_DEFINED_ -#ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ int -#endif -typedef __WCHAR_TYPE__ wchar_t; -#endif - -#ifndef _DIV_T_DEFINED -typedef struct { - int quot; /* quotient */ - int rem; /* remainder */ -} div_t; - -typedef struct { - long quot; /* quotient */ - long rem; /* remainder */ -} ldiv_t; - -typedef struct { - long long quot; /* quotient */ - long long rem; /* remainder */ -} lldiv_t; -#define _DIV_T_DEFINED -#endif - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - -#define RAND_MAX 0x7fffffff -#define MB_CUR_MAX 1 - -__BEGIN_DECLS - -_TLIBC_NORETURN_ void _TLIBC_CDECL_ abort(void); -int _TLIBC_CDECL_ atexit(void (*)(void)); -int _TLIBC_CDECL_ abs(int); -double _TLIBC_CDECL_ atof(const char *); -int _TLIBC_CDECL_ atoi(const char *); -long _TLIBC_CDECL_ atol(const char *); -void * _TLIBC_CDECL_ bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); -void * _TLIBC_CDECL_ calloc(size_t, size_t); -div_t _TLIBC_CDECL_ div(int, int); -void _TLIBC_CDECL_ free(void *); -long _TLIBC_CDECL_ labs(long); -ldiv_t _TLIBC_CDECL_ ldiv(long, long); -void * _TLIBC_CDECL_ malloc(size_t); -void * _TLIBC_CDECL_ memalign(size_t, size_t); -void _TLIBC_CDECL_ qsort(void *, size_t, size_t, int (*)(const void *, const void *)); -void * _TLIBC_CDECL_ realloc(void *, size_t); -double _TLIBC_CDECL_ strtod(const char *, char **); -long _TLIBC_CDECL_ strtol(const char *, char **, int); -float _TLIBC_CDECL_ strtof(const char *, char **); - -long long - _TLIBC_CDECL_ atoll(const char *); -long long - _TLIBC_CDECL_ llabs(long long); -lldiv_t - _TLIBC_CDECL_ lldiv(long long, long long); -long long - _TLIBC_CDECL_ strtoll(const char *, char **, int); -unsigned long - _TLIBC_CDECL_ strtoul(const char *, char **, int); -long double - _TLIBC_CDECL_ strtold(const char *, char **); -unsigned long long - _TLIBC_CDECL_ strtoull(const char *, char **, int); - -int _TLIBC_CDECL_ mblen(const char *, size_t); -size_t _TLIBC_CDECL_ mbstowcs(wchar_t *, const char *, size_t); -int _TLIBC_CDECL_ wctomb(char *, wchar_t); -int _TLIBC_CDECL_ mbtowc(wchar_t *, const char *, size_t); -size_t _TLIBC_CDECL_ wcstombs(char *, const wchar_t *, size_t); - - -/* - * Deprecated C99. - */ -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, atexit, void (_TLIBC_CDECL_ *)(void)); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, rand, void); -_TLIBC_DEPRECATED_FUNCTION_(void _TLIBC_CDECL_, srand, unsigned); -_TLIBC_DEPRECATED_FUNCTION_(void _TLIBC_CDECL_, exit, int); -_TLIBC_DEPRECATED_FUNCTION_(void _TLIBC_CDECL_, _Exit, int); -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, getenv, const char *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, system, const char *); - -/* - * Non-C99 Functions. - */ -void * _TLIBC_CDECL_ alloca(size_t); - -/* - * Deprecated Non-C99. - */ -//_TLIBC_DEPRECATED_FUNCTION_(void _TLIBC_CDECL_, _exit, int); - -__END_DECLS - -#endif /* !_STDLIB_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/string.h b/e2e/rust-sgx-sdk/common/inc/string.h deleted file mode 100644 index 00a89fd..0000000 --- a/e2e/rust-sgx-sdk/common/inc/string.h +++ /dev/null @@ -1,130 +0,0 @@ -/* $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. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)string.h 5.10 (Berkeley) 3/9/91 - */ - -#ifndef _STRING_H_ -#define _STRING_H_ - -#include -#include - -#ifndef _SIZE_T_DEFINED_ -typedef __size_t size_t; -#define _SIZE_T_DEFINED_ -#endif - -#ifndef _ERRNO_T_DEFINED -#define _ERRNO_T_DEFINED -typedef int errno_t; -#endif - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -__BEGIN_DECLS - -void * _TLIBC_CDECL_ memchr(const void *, int, size_t); -int _TLIBC_CDECL_ memcmp(const void *, const void *, size_t); -void * _TLIBC_CDECL_ memcpy_nochecks(void *, const void *, size_t); -void * _TLIBC_CDECL_ memcpy(void *, const void *, size_t); -void * _TLIBC_CDECL_ memcpy_verw(void *, const void *, size_t); -void * _TLIBC_CDECL_ memmove(void *, const void *, size_t); -void * _TLIBC_CDECL_ memmove_verw(void *, const void *, size_t); -void * _TLIBC_CDECL_ memset(void *, int, size_t); -void * _TLIBC_CDECL_ memset_verw(void *, int, size_t); -char * _TLIBC_CDECL_ strchr(const char *, int); -int _TLIBC_CDECL_ strcmp(const char *, const char *); -int _TLIBC_CDECL_ strcoll(const char *, const char *); -size_t _TLIBC_CDECL_ strcspn(const char *, const char *); -char * _TLIBC_CDECL_ strerror(int); -size_t _TLIBC_CDECL_ strlen(const char *); -char * _TLIBC_CDECL_ strncat(char *, const char *, size_t); -int _TLIBC_CDECL_ strncmp(const char *, const char *, size_t); -char * _TLIBC_CDECL_ strncpy(char *, const char *, size_t); -char * _TLIBC_CDECL_ strpbrk(const char *, const char *); -char * _TLIBC_CDECL_ strrchr(const char *, int); -size_t _TLIBC_CDECL_ strspn(const char *, const char *); -char * _TLIBC_CDECL_ strstr(const char *, const char *); -char * _TLIBC_CDECL_ strtok(char *, const char *); -size_t _TLIBC_CDECL_ strxfrm(char *, const char *, size_t); -size_t _TLIBC_CDECL_ strlcpy(char *, const char *, size_t); -errno_t _TLIBC_CDECL_ memset_s(void *s, size_t smax, int c, size_t n); -errno_t _TLIBC_CDECL_ memset_verw_s(void *s, size_t smax, int c, size_t n); - -/* - * Deprecated C99. - */ -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, strcat, char *, const char *); -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, strcpy, char *, const char *); - -/* - * Common used non-C99 functions. - */ -char * _TLIBC_CDECL_ strndup(const char *, size_t); -size_t _TLIBC_CDECL_ strnlen(const char *, size_t); -int _TLIBC_CDECL_ consttime_memequal(const void *b1, const void *b2, size_t len); - -/* - * Non-C99 - */ -int _TLIBC_CDECL_ bcmp(const void *, const void *, size_t); -void _TLIBC_CDECL_ bcopy(const void *, void *, size_t); -void _TLIBC_CDECL_ bzero(void *, size_t); -char * _TLIBC_CDECL_ index(const char *, int); -void * _TLIBC_CDECL_ mempcpy(void *, const void *, size_t); -char * _TLIBC_CDECL_ rindex(const char *, int); -char * _TLIBC_CDECL_ stpncpy(char *dest, const char *src, size_t n); -int _TLIBC_CDECL_ strcasecmp(const char *, const char *); -int _TLIBC_CDECL_ strncasecmp(const char *, const char *, size_t); - -int _TLIBC_CDECL_ ffs(int); -int _TLIBC_CDECL_ ffsl(long int); -int _TLIBC_CDECL_ ffsll(long long int); - -char * _TLIBC_CDECL_ strtok_r(char *, const char *, char **); -int _TLIBC_CDECL_ strerror_r(int, char *, size_t); - -/* - * Deprecated Non-C99. - */ -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, strdup, const char *); -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, stpcpy, char *dest, const char *src); - -__END_DECLS - -#endif /* _STRING_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/sys/_types.h b/e2e/rust-sgx-sdk/common/inc/sys/_types.h deleted file mode 100644 index 5dc6d5b..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/_types.h +++ /dev/null @@ -1,168 +0,0 @@ -/* $OpenBSD: _types.h,v 1.2 2008/03/16 19:42:57 otto Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)types.h 8.3 (Berkeley) 1/5/94 - */ - -#ifndef _SYS__TYPES_H_ -#define _SYS__TYPES_H_ - -#include -/* 7.18.1.1 Exact-width integer types */ -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef short __int16_t; -typedef unsigned short __uint16_t; -typedef int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __x86_64__ -typedef long __int64_t; -typedef unsigned long __uint64_t; -#else -typedef long long __int64_t; -typedef unsigned long long __uint64_t; -#endif - -/* 7.18.1.2 Minimum-width integer types */ -typedef __int8_t __int_least8_t; -typedef __uint8_t __uint_least8_t; -typedef __int16_t __int_least16_t; -typedef __uint16_t __uint_least16_t; -typedef __int32_t __int_least32_t; -typedef __uint32_t __uint_least32_t; -typedef __int64_t __int_least64_t; -typedef __uint64_t __uint_least64_t; - -/* 7.18.1.3 Fastest minimum-width integer types */ -typedef __int8_t __int_fast8_t; -typedef __uint8_t __uint_fast8_t; -#ifdef __x86_64__ -/* Linux x86_64, from stdint.h */ -typedef long int __int_fast16_t; -typedef unsigned long int __uint_fast16_t; -typedef long int __int_fast32_t; -typedef unsigned long int __uint_fast32_t; -typedef long int __int_fast64_t; -typedef unsigned long int __uint_fast64_t; -#else -/* Android x86, and Linux x86 */ -typedef __int32_t __int_fast16_t; -typedef __uint32_t __uint_fast16_t; -typedef __int32_t __int_fast32_t; -typedef __uint32_t __uint_fast32_t; -typedef __int64_t __int_fast64_t; -typedef __uint64_t __uint_fast64_t; -#endif - -typedef long __off_t; -#ifdef __x86_64__ -typedef long int __off64_t; -#else -typedef long long int __off64_t; -#endif - -/* 7.18.1.4 Integer types capable of holding object pointers */ -#ifdef __i386__ -typedef __int32_t __intptr_t; -typedef __uint32_t __uintptr_t; -typedef __int32_t __ptrdiff_t; -/* Standard system types */ -typedef __uint32_t __size_t; -typedef __int32_t __ssize_t; -typedef long double __double_t; -typedef long double __float_t; -#else -typedef __int64_t __intptr_t; -typedef __uint64_t __uintptr_t; -typedef __int64_t __ptrdiff_t; - -/* Standard system types */ -typedef unsigned long __size_t; -typedef long __ssize_t; -typedef double __double_t; -typedef float __float_t; - -#endif /* !__i386__ */ - -typedef long __clock_t; - -typedef long __time_t; -typedef __builtin_va_list __va_list; -typedef unsigned int __wint_t; -/* wctype_t and wctrans_t are defined in wchar.h */ -typedef unsigned long int __wctype_t; -typedef int * __wctrans_t; - -/* - * mbstate_t is an opaque object to keep conversion state, during multibyte - * stream conversions. The content must not be referenced by user programs. - */ -/* For Linux, __mbstate_t is defined in wchar.h */ -typedef struct { - int __c; - union { - __wint_t __wc; - char __wcb[4]; - } __v; -} __mbstate_t; - -/* 7.18.1.5 Greatest-width integer types */ -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; - -#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; -#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; -#endif - -typedef unsigned int __socklen_t; -typedef int __pid_t; -typedef long __cpu_mask; -#endif /* !_SYS__TYPES_H_ */ - - - diff --git a/e2e/rust-sgx-sdk/common/inc/sys/cdefs.h b/e2e/rust-sgx-sdk/common/inc/sys/cdefs.h deleted file mode 100644 index 71c3c1c..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/cdefs.h +++ /dev/null @@ -1,132 +0,0 @@ -/* $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 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Berkeley Software Design, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)cdefs.h 8.7 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_CDEFS_H_ -#define _SYS_CDEFS_H_ - -/* Declaration field in C/C++ headers */ -#if defined(__cplusplus) -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif - -#if defined(__STDC__) || defined(__cplusplus) -# define __CONCAT(x,y) x ## y -# define __STRING(x) #x -#else -# define __CONCAT(x,y) x/**/y -# define __STRING(x) "x" -#endif -/* - * Macro to test if we're using a specific version of gcc or later. - */ -#if defined __GNUC__ && defined __GNUC_MINOR_ -# define __GNUC_PREREQ__(ma, mi) \ - ((__GNUC__ > (ma)) || (__GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))) -#else -# define __GNUC_PREREQ__(ma, mi) 0 -#endif - -/* Calling Convention: cdecl */ -#define _TLIBC_CDECL_ - -/* Thread Directive */ -#define _TLIBC_THREAD_ /* __thread */ - -/* Deprecated Warnings */ -#define _TLIBC_DEPRECATED_MSG(x) __STRING(x)" is deprecated in tlibc." -#define _TLIBC_DEPRECATED_(x) __attribute__((deprecated(_TLIBC_DEPRECATED_MSG(x)))) - -#ifndef _TLIBC_WARN_DEPRECATED_FUNCTIONS_ -# define _TLIBC_DEPRECATED_FUNCTION_(__ret, __func, ...) -#else -# define _TLIBC_DEPRECATED_FUNCTION_(__ret, __func, ...) \ - _TLIBC_DEPRECATED_(__func) \ - __ret __func(__VA_ARGS__) -#endif - -/* Static analysis for printf format strings. - * _MSC_PRINTF_FORMAT_: MSVC SAL annotation for specifying format strings. - * _GCC_PRINTF_FORMAT_(x, y): GCC declaring attribute for checking format strings. - * x - index of the format string. In C++ non-static method, index 1 is reseved for 'this'. - * y - index of first variadic agrument in '...'. - */ -#define _GCC_PRINTF_FORMAT_(x, y) __attribute__((__format__ (printf, x, y))) - -/* Attribute - noreturn */ -#define _TLIBC_NORETURN_ __attribute__ ((__noreturn__)) - -/* - * GNU C version 2.96 adds explicit branch prediction so that - * the CPU back-end can hint the processor and also so that - * code blocks can be reordered such that the predicted path - * sees a more linear flow, thus improving cache behavior, etc. - * - * The following two macros provide us with a way to utilize this - * compiler feature. Use __predict_true() if you expect the expression - * to evaluate to true, and __predict_false() if you expect the - * expression to evaluate to false. - * - * A few notes about usage: - * - * * Generally, __predict_false() error condition checks (unless - * you have some _strong_ reason to do otherwise, in which case - * document it), and/or __predict_true() `no-error' condition - * checks, assuming you want to optimize for the no-error case. - * - * * Other than that, if you don't know the likelihood of a test - * succeeding from empirical or other `hard' evidence, don't - * make predictions. - * - * * These are meant to be used in places that are run `a lot'. - * It is wasteful to make predictions in code that is run - * seldomly (e.g. at subsystem initialization time) as the - * basic block reordering that this affects can often generate - * 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) -#else -#define __predict_true(exp) ((exp) != 0) -#define __predict_false(exp) ((exp) != 0) -#endif - -#endif /* !_SYS_CDEFS_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/sys/endian.h b/e2e/rust-sgx-sdk/common/inc/sys/endian.h deleted file mode 100644 index 1cd7b81..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/endian.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */ - -/*- - * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -/* - * Generic definitions for little- and big-endian systems. Other endianesses - * has to be dealt with in the specific machine/endian.h file for that port. - * - * This file is meant to be included from a little- or big-endian port's - * machine/endian.h after setting _BYTE_ORDER to either 1234 for little endian - * or 4321 for big.. - */ - -#ifndef _SYS_ENDIAN_H_ -#define _SYS_ENDIAN_H_ - -#define _LITTLE_ENDIAN 1234 -#define _BIG_ENDIAN 4321 -#define _PDP_ENDIAN 3412 -#define _BYTE_ORDER _LITTLE_ENDIAN - -#define LITTLE_ENDIAN _LITTLE_ENDIAN -#define BIG_ENDIAN _BIG_ENDIAN -#define PDP_ENDIAN _PDP_ENDIAN -#define BYTE_ORDER _BYTE_ORDER - -#define __BYTE_ORDER _BYTE_ORDER -#define __BIG_ENDIAN _BIG_ENDIAN -#define __LITTLE_ENDIAN _LITTLE_ENDIAN - -#endif /* _SYS_ENDIAN_H_ */ - diff --git a/e2e/rust-sgx-sdk/common/inc/sys/epoll.h b/e2e/rust-sgx-sdk/common/inc/sys/epoll.h deleted file mode 100644 index 958a4c4..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/epoll.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license. -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _SYS_EPOLL_H -#define _SYS_EPOLL_H - -typedef union epoll_data { - void *ptr; - int fd; - uint32_t u32; - uint64_t u64; -} epoll_data_t; - -struct epoll_event { - uint32_t events; - epoll_data_t data; -} __attribute__ ((__packed__)); - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/sys/ieee.h b/e2e/rust-sgx-sdk/common/inc/sys/ieee.h deleted file mode 100644 index eab3b97..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/ieee.h +++ /dev/null @@ -1,145 +0,0 @@ -/* $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 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Lawrence Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)ieee.h 8.1 (Berkeley) 6/11/93 - */ - -/* - * ieee.h defines the machine-dependent layout of the machine's IEEE - * floating point. It does *not* define (yet?) any of the rounding - * mode bits, exceptions, and so forth. - */ - -/* - * Define the number of bits in each fraction and exponent. - * - * k k+1 - * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented - * - * (-exp_bias+1) - * as fractions that look like 0.fffff x 2 . This means that - * - * -126 - * the number 0.10000 x 2 , for instance, is the same as the normalized - * - * -127 -128 - * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero - * - * -129 - * in the fraction; to represent 2 , we need two, and so on. This - * - * (-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 - * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and - * - * -149 == -127 - 23 + 1. - */ - -#include - -#define SNG_EXPBITS 8 -#define SNG_FRACBITS 23 - -#define DBL_EXPBITS 11 -#define DBL_FRACHBITS 20 -#define DBL_FRACLBITS 32 -#define DBL_FRACBITS 52 - -#define EXT_EXPBITS 15 -#define EXT_FRACHBITS 32 -#define EXT_FRACLBITS 32 -#define EXT_FRACBITS 64 - -#define EXT_TO_ARRAY32(p, a) do { \ - (a)[0] = (uint32_t)(p)->ext_fracl; \ - (a)[1] = (uint32_t)(p)->ext_frach; \ -} while(0) - -struct ieee_single { - u_int sng_frac:23; - u_int sng_exp:8; - u_int sng_sign:1; -}; - -struct ieee_double { - u_int dbl_fracl; - u_int dbl_frach:20; - u_int dbl_exp:11; - u_int dbl_sign:1; -}; - -struct ieee_ext { - u_int ext_fracl; - u_int ext_frach; - u_int ext_exp:15; - u_int ext_sign:1; - u_int ext_padl:16; - u_int ext_padh; -}; - -/* - * Floats whose exponent is in [1..INFNAN) (of whatever type) are - * `normal'. Floats whose exponent is INFNAN are either Inf or NaN. - * Floats whose exponent is zero are either zero (iff all fraction - * bits are zero) or subnormal values. - * - * A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its - * high fraction; if the bit is set, it is a `quiet NaN'. - */ -#define SNG_EXP_INFNAN 255 -#define DBL_EXP_INFNAN 2047 -#define EXT_EXP_INFNAN 32767 - -#if 0 -#define SNG_QUIETNAN (1 << 22) -#define DBL_QUIETNAN (1 << 19) -#define EXT_QUIETNAN (1 << 15) -#endif - -/* - * Exponent biases. - */ -#define SNG_EXP_BIAS 127 -#define DBL_EXP_BIAS 1023 -#define EXT_EXP_BIAS 16383 diff --git a/e2e/rust-sgx-sdk/common/inc/sys/limits.h b/e2e/rust-sgx-sdk/common/inc/sys/limits.h deleted file mode 100644 index 3d1f967..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/limits.h +++ /dev/null @@ -1,77 +0,0 @@ -/* $OpenBSD: limits.h,v 1.8 2009/11/27 19:54:35 guenther Exp $ */ -/* - * Copyright (c) 2002 Marc Espie. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT 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 OPENBSD - * PROJECT 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. - */ -#ifndef _SYS_LIMITS_H_ -#define _SYS_LIMITS_H_ - -#include - -/* Common definitions for limits.h. */ - -#define CHAR_BIT 8 /* number of bits in a char */ - -#define SCHAR_MAX 0x7f /* max value for a signed char */ -#define SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ - -#define UCHAR_MAX 0xff /* max value for an unsigned char */ -#ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 /* min value for a char */ -# define CHAR_MAX 0xff /* max value for a char */ -#else -# define CHAR_MAX 0x7f -# define CHAR_MIN (-0x7f-1) -#endif - -#define MB_LEN_MAX 1 /* Allow UTF-8 (RFC 3629) */ - -#define USHRT_MAX 0xffff /* max value for an unsigned short */ -#define SHRT_MAX 0x7fff /* max value for a short */ -#define SHRT_MIN (-0x7fff-1) /* min value for a short */ - -#define UINT_MAX 0xffffffffU /* max value for an unsigned int */ -#define INT_MAX 0x7fffffff /* max value for an int */ -#define INT_MIN (-0x7fffffff-1) /* min value for an int */ - -#ifdef __x86_64__ -# define ULONG_MAX 0xffffffffffffffffUL /* max value for unsigned long */ -# define LONG_MAX 0x7fffffffffffffffL /* max value for a signed long */ -# define LONG_MIN (-0x7fffffffffffffffL-1) /* min value for a signed long */ -#else -# define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */ -# define LONG_MAX 0x7fffffffL /* max value for a long */ -# define LONG_MIN (-0x7fffffffL-1) /* min value for a long */ -#endif - -#define ULLONG_MAX 0xffffffffffffffffULL /* max value for unsigned long long */ -#define LLONG_MAX 0x7fffffffffffffffLL /* max value for a signed long long */ -#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min value for a signed long long */ - -#ifdef __x86_64__ -# define LONG_BIT 64 -#else -# define LONG_BIT 32 -#endif - -#endif /* !_SYS_LIMITS_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/sys/sockaddr.h b/e2e/rust-sgx-sdk/common/inc/sys/sockaddr.h deleted file mode 100644 index ba6811c..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/sockaddr.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license. -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _SYS_SOCKADDR_H_ -#define _SYS_SOCKADDR_H_ - -typedef unsigned short int sa_family_t; - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/sys/socket.h b/e2e/rust-sgx-sdk/common/inc/sys/socket.h deleted file mode 100644 index 0b16699..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/socket.h +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license. -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _SYS_SOCKET_H_ -#define _SYS_SOCKET_H_ - -#include -#include -#include - -typedef __socklen_t socklen_t; - -struct sockaddr { - sa_family_t sa_family; - char sa_data[14]; -}; - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - - struct iovec *msg_iov; - size_t msg_iovlen; - - void *msg_control; - size_t msg_controllen; - - int msg_flags; -}; - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/sys/stat.h b/e2e/rust-sgx-sdk/common/inc/sys/stat.h deleted file mode 100644 index 1cf090a..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/stat.h +++ /dev/null @@ -1,127 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license. -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - - -#ifndef _SYS_STAT_H_ -#define _SYS_STAT_H_ - -#include -#include -#include - -typedef __dev_t dev_t; -typedef __ino_t ino_t; -typedef __ino64_t ino64_t; -typedef __mode_t mode_t; -typedef __nlink_t nlink_t; -typedef __uid_t uid_t; -typedef __gid_t gid_t; -typedef __blksize_t blksize_t; -typedef __blkcnt_t blkcnt_t; -typedef __blkcnt64_t blkcnt64_t; - -struct stat { - dev_t st_dev; - ino_t st_ino; - nlink_t st_nlink; - - mode_t st_mode; - uid_t st_uid; - gid_t st_gid; - unsigned int __pad0; - dev_t st_rdev; - off_t st_size; - blksize_t st_blksize; - blkcnt_t st_blocks; - - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - long __unused[3]; -}; - -struct stat64 { - dev_t st_dev; - ino64_t st_ino; - nlink_t st_nlink; - - mode_t st_mode; - uid_t st_uid; - gid_t st_gid; - unsigned int __pad0; - dev_t st_rdev; - off_t st_size; - blksize_t st_blksize; - blkcnt64_t st_blocks; - - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; - long __unused[3]; -}; - -#define S_IFMT 0170000 - -#define S_IFDIR 0040000 -#define S_IFCHR 0020000 -#define S_IFBLK 0060000 -#define S_IFREG 0100000 -#define S_IFIFO 0010000 -#define S_IFLNK 0120000 -#define S_IFSOCK 0140000 - -#define S_TYPEISMQ(buf) 0 -#define S_TYPEISSEM(buf) 0 -#define S_TYPEISSHM(buf) 0 -#define S_TYPEISTMO(buf) 0 - -#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) -#define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) -#define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) -#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) -#define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO) -#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) -#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK) - -#ifndef S_IRUSR -#define S_ISUID 04000 -#define S_ISGID 02000 -#define S_ISVTX 01000 -#define S_IRUSR 0400 -#define S_IWUSR 0200 -#define S_IXUSR 0100 -#define S_IRWXU 0700 -#define S_IRGRP 0040 -#define S_IWGRP 0020 -#define S_IXGRP 0010 -#define S_IRWXG 0070 -#define S_IROTH 0004 -#define S_IWOTH 0002 -#define S_IXOTH 0001 -#define S_IRWXO 0007 -#endif - -#endif /* _SYS_STAT_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/sys/stdint.h b/e2e/rust-sgx-sdk/common/inc/sys/stdint.h deleted file mode 100644 index 5159945..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/stdint.h +++ /dev/null @@ -1,260 +0,0 @@ -/* $OpenBSD: stdint.h,v 1.4 2006/12/10 22:17:55 deraadt Exp $ */ - -/* - * Copyright (c) 1997, 2005 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SYS_STDINT_H_ -#define _SYS_STDINT_H_ - -#include -#include - -/* 7.18.1.1 Exact-width integer types (also in sys/types.h) */ -#ifndef _INT8_T_DEFINED_ -#define _INT8_T_DEFINED_ -typedef __int8_t int8_t; -#endif - -#ifndef _UINT8_T_DEFINED_ -#define _UINT8_T_DEFINED_ -typedef __uint8_t uint8_t; -#endif - -#ifndef _INT16_T_DEFINED_ -#define _INT16_T_DEFINED_ -typedef __int16_t int16_t; -#endif - -#ifndef _UINT16_T_DEFINED_ -#define _UINT16_T_DEFINED_ -typedef __uint16_t uint16_t; -#endif - -#ifndef _INT32_T_DEFINED_ -#define _INT32_T_DEFINED_ -typedef __int32_t int32_t; -#endif - -#ifndef _UINT32_T_DEFINED_ -#define _UINT32_T_DEFINED_ -typedef __uint32_t uint32_t; -#endif - -#ifndef _INT64_T_DEFINED_ -#define _INT64_T_DEFINED_ -typedef __int64_t int64_t; -#endif - -#ifndef _UINT64_T_DEFINED_ -#define _UINT64_T_DEFINED_ -typedef __uint64_t uint64_t; -#endif - -/* 7.18.1.2 Minimum-width integer types */ -typedef __int_least8_t int_least8_t; -typedef __uint_least8_t uint_least8_t; -typedef __int_least16_t int_least16_t; -typedef __uint_least16_t uint_least16_t; -typedef __int_least32_t int_least32_t; -typedef __uint_least32_t uint_least32_t; -typedef __int_least64_t int_least64_t; -typedef __uint_least64_t uint_least64_t; - -/* 7.18.1.3 Fastest minimum-width integer types */ -typedef __int_fast8_t int_fast8_t; -typedef __uint_fast8_t uint_fast8_t; -typedef __int_fast16_t int_fast16_t; -typedef __uint_fast16_t uint_fast16_t; -typedef __int_fast32_t int_fast32_t; -typedef __uint_fast32_t uint_fast32_t; -typedef __int_fast64_t int_fast64_t; -typedef __uint_fast64_t uint_fast64_t; - -/* 7.18.1.4 Integer types capable of holding object pointers */ -#ifndef _INTPTR_T_DEFINED_ -#define _INTPTR_T_DEFINED_ -typedef __intptr_t intptr_t; -#endif - -#ifndef _UINTPTR_T_DEFINED_ -#define _UINTPTR_T_DEFINED_ -typedef __uintptr_t uintptr_t; -#endif - -/* 7.18.1.5 Greatest-width integer types */ -typedef __intmax_t intmax_t; -typedef __uintmax_t uintmax_t; - -//#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) -/* - * 7.18.2 Limits of specified-width integer types. - * - * The following object-like macros specify the minimum and maximum limits - * of integer types corresponding to the typedef names defined above. - */ - -/* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MIN (-0x7f - 1) -#define INT16_MIN (-0x7fff - 1) -#define INT32_MIN (-0x7fffffff - 1) -#ifdef __x86_64__ -#define INT64_MIN (-0x7fffffffffffffffL - 1) -#else -#define INT64_MIN (-0x7fffffffffffffffLL - 1) -#endif - -#define INT8_MAX 0x7f -#define INT16_MAX 0x7fff -#define INT32_MAX 0x7fffffff -#ifdef __x86_64__ -#define INT64_MAX 0x7fffffffffffffffL -#else -#define INT64_MAX 0x7fffffffffffffffLL -#endif - -#define UINT8_MAX 0xff -#define UINT16_MAX 0xffff -#define UINT32_MAX 0xffffffffU -#ifdef __x86_64__ -#define UINT64_MAX 0xffffffffffffffffUL -#else -#define UINT64_MAX 0xffffffffffffffffULL -#endif - -/* 7.18.2.2 Limits of minimum-width integer types */ -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST64_MIN INT64_MIN - -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MAX INT64_MAX - -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -/* 7.18.2.3 Limits of fastest minimum-width integer types */ -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST64_MIN INT64_MIN - -#define INT_FAST8_MAX INT8_MAX -#ifdef __x86_64__ -#define INT_FAST16_MAX INT64_MAX -#define INT_FAST32_MAX INT64_MAX -#else -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX -#endif -#define INT_FAST64_MAX INT64_MAX - -#define UINT_FAST8_MAX UINT8_MAX -#ifdef __x86_64__ -#define UINT_FAST16_MAX UINT64_MAX -#define UINT_FAST32_MAX UINT64_MAX -#else -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX -#endif -#define UINT_FAST64_MAX UINT64_MAX - -/* 7.18.2.4 Limits of integer types capable of holding object pointers */ -#ifdef __x86_64__ -#define INTPTR_MIN INT64_MIN -#define INTPTR_MAX INT64_MAX -#define UINTPTR_MAX UINT64_MAX -#else -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#endif - -/* 7.18.2.5 Limits of greatest-width integer types */ -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -/* - * 7.18.3 Limits of other integer types. - * - * The following object-like macros specify the minimum and maximum limits - * of integer types corresponding to types specified in other standard - * header files. - */ - -/* Limits of ptrdiff_t */ -#define PTRDIFF_MIN INTPTR_MIN -#define PTRDIFF_MAX INTPTR_MAX - -/* Limits of size_t (also in limits.h) */ -#ifndef SIZE_MAX -#define SIZE_MAX UINTPTR_MAX -#endif - -/* Limits of wchar_t */ -# ifdef __WCHAR_MAX__ -# define WCHAR_MAX __WCHAR_MAX__ -# else -# define WCHAR_MAX (2147483647) -# endif -# ifdef __WCHAR_MIN__ -# define WCHAR_MIN __WCHAR_MIN__ -# elif L'\0' - 1 > 0 -# define WCHAR_MIN L'\0' -# else -# define WCHAR_MIN (-WCHAR_MAX - 1) -# endif - -/* Limits of wint_t */ -# define WINT_MIN (0u) -# define WINT_MAX (4294967295u) - -//#endif /* __cplusplus || __STDC_LIMIT_MACROS */ - -//#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) -/* - * 7.18.4 Macros for integer constants. - * - * The following function-like macros expand to integer constants - * suitable for initializing objects that have integer types corresponding - * to types defined in . The argument in any instance of - * these macros shall be a decimal, octal, or hexadecimal constant with - * a value that does not exceed the limits for the corresponding type. - */ - -/* 7.18.4.1 Macros for minimum-width integer constants. */ -#define INT8_C(_c) (_c) -#define INT16_C(_c) (_c) -#define INT32_C(_c) (_c) -#define INT64_C(_c) __CONCAT(_c, LL) - -#define UINT8_C(_c) (_c) -#define UINT16_C(_c) (_c) -#define UINT32_C(_c) __CONCAT(_c, U) -#define UINT64_C(_c) __CONCAT(_c, ULL) - -/* 7.18.4.2 Macros for greatest-width integer constants. */ -#define INTMAX_C(_c) __CONCAT(_c, LL) -#define UINTMAX_C(_c) __CONCAT(_c, ULL) - -//#endif /* __cplusplus || __STDC_CONSTANT_MACROS */ - -#endif /* _SYS_STDINT_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/sys/struct_timespec.h b/e2e/rust-sgx-sdk/common/inc/sys/struct_timespec.h deleted file mode 100644 index bca02c8..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/struct_timespec.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license. -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _SYS_TIMESPEC_H_ -#define _SYS_TIMESPEC_H_ - -#include - -struct timespec { - __time_t tv_sec; - long tv_nsec; -}; - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/sys/types.h b/e2e/rust-sgx-sdk/common/inc/sys/types.h deleted file mode 100644 index b64f89d..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/types.h +++ /dev/null @@ -1,129 +0,0 @@ -/* $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 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)types.h 8.4 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_TYPES_H_ -#define _SYS_TYPES_H_ - -#include -#include - -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; - -typedef unsigned char unchar; /* Sys V compatibility */ -typedef unsigned short ushort; /* Sys V compatibility */ -typedef unsigned int uint; /* Sys V compatibility */ -typedef unsigned long ulong; /* Sys V compatibility */ - -#ifndef _INT8_T_DEFINED_ -#define _INT8_T_DEFINED_ -typedef __int8_t int8_t; -#endif - -#ifndef _UINT8_T_DEFINED_ -#define _UINT8_T_DEFINED_ -typedef __uint8_t uint8_t; -#endif - -#ifndef _INT16_T_DEFINED_ -#define _INT16_T_DEFINED_ -typedef __int16_t int16_t; -#endif - -#ifndef _UINT16_T_DEFINED_ -#define _UINT16_T_DEFINED_ -typedef __uint16_t uint16_t; -#endif - -#ifndef _INT32_T_DEFINED_ -#define _INT32_T_DEFINED_ -typedef __int32_t int32_t; -#endif - -#ifndef _UINT32_T_DEFINED_ -#define _UINT32_T_DEFINED_ -typedef __uint32_t uint32_t; -#endif - -#ifndef _INT64_T_DEFINED_ -#define _INT64_T_DEFINED_ -typedef __int64_t int64_t; -#endif - -#ifndef _UINT64_T_DEFINED_ -#define _UINT64_T_DEFINED_ -typedef __uint64_t uint64_t; -#endif - -#ifndef _INTPTR_T_DEFINED_ -#define _INTPTR_T_DEFINED_ -typedef __intptr_t intptr_t; -#endif - -#ifndef _UINTPTR_T_DEFINED_ -#define _UINTPTR_T_DEFINED_ -typedef __uintptr_t uintptr_t; -#endif - -/* BSD-style unsigned bits types */ -typedef __uint8_t u_int8_t; -typedef __uint16_t u_int16_t; -typedef __uint32_t u_int32_t; -typedef __uint64_t u_int64_t; - - -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef __size_t size_t; -#endif - -#ifndef _SSIZE_T_DEFINED_ -#define _SSIZE_T_DEFINED_ -typedef __ssize_t ssize_t; -#endif - -#ifndef _OFF_T_DEFINED_ -#define _OFF_T_DEFINED_ -typedef __off_t off_t; -typedef __off64_t off64_t; -#endif - -#endif /* !_SYS_TYPES_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/sys/uio.h b/e2e/rust-sgx-sdk/common/inc/sys/uio.h deleted file mode 100644 index 2544f06..0000000 --- a/e2e/rust-sgx-sdk/common/inc/sys/uio.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright © 2005-2020 Rich Felker, et al. -// Licensed under the MIT license. -// - -/* Copyright © 2005-2020 Rich Felker, et al. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef _SYS_UIO_H_ -#define _SYS_UIO_H_ - -struct iovec { - void *iov_base; - size_t iov_len; -}; - -#endif diff --git a/e2e/rust-sgx-sdk/common/inc/time.h b/e2e/rust-sgx-sdk/common/inc/time.h deleted file mode 100644 index 01cfd6e..0000000 --- a/e2e/rust-sgx-sdk/common/inc/time.h +++ /dev/null @@ -1,105 +0,0 @@ -/* $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. - * All rights reserved. - * - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)time.h 5.12 (Berkeley) 3/9/91 - */ - -#ifndef _TIME_H_ -#define _TIME_H_ - -#include -#include -#include - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#if !defined (_CLOCK_T_DEFINED_) && !defined (_CLOCK_T_DEFINED) -#define _CLOCK_T_DEFINED_ -#define _CLOCK_T_DEFINED -typedef __clock_t clock_t; -#endif - -#if !defined (_TIME_T_DEFINED_) && !defined (_TIME_T_DEFINED) -#define _TIME_T_DEFINED_ -#define _TIME_T_DEFINED -typedef __time_t time_t; -#endif - -#if !defined (_SIZE_T_DEFINED_) && !defined (_SIZE_T_DEFINED) -#define _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED -typedef __size_t size_t; -#endif - -#if !defined (_TM_DEFINED) -#define _TM_DEFINED -struct tm { - int tm_sec; /* seconds after the minute [0-60] */ - int tm_min; /* minutes after the hour [0-59] */ - int tm_hour; /* hours since midnight [0-23] */ - int tm_mday; /* day of the month [1-31] */ - int tm_mon; /* months since January [0-11] */ - int tm_year; /* years since 1900 */ - int tm_wday; /* days since Sunday [0-6] */ - int tm_yday; /* days since January 1 [0-365] */ - int tm_isdst; /* Daylight Saving Time flag */ - /* FIXME: naming issue exists on Fedora/Ubuntu */ - long tm_gmtoff; /* offset from UTC in seconds */ - char *tm_zone; /* timezone abbreviation */ -}; -#endif - -__BEGIN_DECLS - -double _TLIBC_CDECL_ difftime(time_t, time_t); -char * _TLIBC_CDECL_ asctime(const struct tm *); -size_t _TLIBC_CDECL_ strftime(char *, size_t, const char *, const struct tm *); - -/* - * Non-C99 - */ -char * _TLIBC_CDECL_ asctime_r(const struct tm *, char *); - -__END_DECLS - -#endif /* !_TIME_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/unistd.h b/e2e/rust-sgx-sdk/common/inc/unistd.h deleted file mode 100644 index 2ab3a9a..0000000 --- a/e2e/rust-sgx-sdk/common/inc/unistd.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $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. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * @(#)unistd.h 5.13 (Berkeley) 6/17/91 - */ - -#ifndef _UNISTD_H_ -#define _UNISTD_H_ - -#include -#include - -__BEGIN_DECLS - -void * _TLIBC_CDECL_ sbrk(intptr_t); - -/* - * Deprecated Non-C99. - */ -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execl, const char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execlp, const char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execle, const char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execv, const char *, char * const *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execve, const char *, char * const *, char * const *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execvp, const char *, char * const *); - -//_TLIBC_DEPRECATED_FUNCTION_(pid_t _TLIBC_CDECL_, fork, void); /* no pid_t */ - -__END_DECLS - -#endif /* !_UNISTD_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/wchar.h b/e2e/rust-sgx-sdk/common/inc/wchar.h deleted file mode 100644 index 2db86f2..0000000 --- a/e2e/rust-sgx-sdk/common/inc/wchar.h +++ /dev/null @@ -1,143 +0,0 @@ -/* $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, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - */ - -/*- - * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Julian Coleman. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _WCHAR_H_ -#define _WCHAR_H_ - -#include -#include -#include /* WCHAR_MAX/WCHAR_MIN */ - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus) -#define _WCHAR_T_DEFINED_ -#ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ int -#endif -typedef __WCHAR_TYPE__ wchar_t; -#endif - -#ifndef _MBSTATE_T_DEFINED_ -#define _MBSTATE_T_DEFINED_ -typedef __mbstate_t mbstate_t; -#endif - -#ifndef _WINT_T_DEFINED_ -#define _WINT_T_DEFINED_ -typedef __wint_t wint_t; -#endif - -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef __size_t size_t; -#endif - -#ifndef WEOF -#define WEOF ((wint_t)-1) -#endif - -__BEGIN_DECLS - -wint_t _TLIBC_CDECL_ btowc(int); -int _TLIBC_CDECL_ wctob(wint_t); -size_t _TLIBC_CDECL_ mbrlen(const char *, size_t, mbstate_t *); -size_t _TLIBC_CDECL_ mbrtowc(wchar_t *, const char *, size_t, mbstate_t *); -int _TLIBC_CDECL_ mbsinit(const mbstate_t *); -size_t _TLIBC_CDECL_ mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *); -size_t _TLIBC_CDECL_ wcrtomb(char *, wchar_t, mbstate_t *); -wchar_t * _TLIBC_CDECL_ wcschr(const wchar_t *, wchar_t); -int _TLIBC_CDECL_ wcscmp(const wchar_t *, const wchar_t *); -int _TLIBC_CDECL_ wcscoll(const wchar_t *, const wchar_t *); -size_t _TLIBC_CDECL_ wcscspn(const wchar_t *, const wchar_t *); -size_t _TLIBC_CDECL_ wcslen(const wchar_t *); -wchar_t * _TLIBC_CDECL_ wcsncat(wchar_t *, const wchar_t *, size_t); -int _TLIBC_CDECL_ wcsncmp(const wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wcsncpy(wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wcspbrk(const wchar_t *, const wchar_t *); -wchar_t * _TLIBC_CDECL_ wcsrchr(const wchar_t *, wchar_t); -size_t _TLIBC_CDECL_ wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *); -size_t _TLIBC_CDECL_ wcsspn(const wchar_t *, const wchar_t *); -wchar_t * _TLIBC_CDECL_ wcsstr(const wchar_t *, const wchar_t *); -wchar_t * _TLIBC_CDECL_ wcstok(wchar_t *, const wchar_t *, wchar_t **); -size_t _TLIBC_CDECL_ wcsxfrm(wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wmemchr(const wchar_t *, wchar_t, size_t); -int _TLIBC_CDECL_ wmemcmp(const wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wmemcpy(wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wmemmove(wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wmemset(wchar_t *, wchar_t, size_t); - -int _TLIBC_CDECL_ swprintf(wchar_t *, size_t, const wchar_t *, ...); -int _TLIBC_CDECL_ vswprintf(wchar_t *, size_t, const wchar_t *, __va_list); - -long double _TLIBC_CDECL_ wcstold (const wchar_t *, wchar_t **); -long long _TLIBC_CDECL_ wcstoll (const wchar_t *, wchar_t **, int); -unsigned long long _TLIBC_CDECL_ wcstoull (const wchar_t *, wchar_t **, int); - -/* leagcy version of wcsstr */ -wchar_t * _TLIBC_CDECL_ wcswcs(const wchar_t *, const wchar_t *); - -__END_DECLS - -#endif /* !_WCHAR_H_ */ diff --git a/e2e/rust-sgx-sdk/common/inc/wctype.h b/e2e/rust-sgx-sdk/common/inc/wctype.h deleted file mode 100644 index 0ab9497..0000000 --- a/e2e/rust-sgx-sdk/common/inc/wctype.h +++ /dev/null @@ -1,80 +0,0 @@ -/* $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, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp - */ - -#ifndef _WCTYPE_H_ -#define _WCTYPE_H_ - -#include -#include - -#ifndef _WINT_T_DEFINED_ -#define _WINT_T_DEFINED_ -typedef __wint_t wint_t; -#endif - -#ifndef _WCTRANS_T_DEFINED_ -#define _WCTRANS_T_DEFINED_ -typedef __wctrans_t wctrans_t; -#endif - -#ifndef _WCTYPE_T_DEFINED_ -#define _WCTYPE_T_DEFINED_ -typedef __wctype_t wctype_t; -#endif - -#ifndef WEOF -#define WEOF ((wint_t)-1) -#endif - -__BEGIN_DECLS - -int _TLIBC_CDECL_ iswalnum(wint_t); -int _TLIBC_CDECL_ iswalpha(wint_t); -int _TLIBC_CDECL_ iswblank(wint_t); -int _TLIBC_CDECL_ iswcntrl(wint_t); -int _TLIBC_CDECL_ iswdigit(wint_t); -int _TLIBC_CDECL_ iswgraph(wint_t); -int _TLIBC_CDECL_ iswlower(wint_t); -int _TLIBC_CDECL_ iswprint(wint_t); -int _TLIBC_CDECL_ iswpunct(wint_t); -int _TLIBC_CDECL_ iswspace(wint_t); -int _TLIBC_CDECL_ iswupper(wint_t); -int _TLIBC_CDECL_ iswxdigit(wint_t); -int _TLIBC_CDECL_ iswctype(wint_t, wctype_t); -wint_t _TLIBC_CDECL_ towctrans(wint_t, wctrans_t); -wint_t _TLIBC_CDECL_ towlower(wint_t); -wint_t _TLIBC_CDECL_ towupper(wint_t); -wctrans_t _TLIBC_CDECL_ wctrans(const char *); -wctype_t _TLIBC_CDECL_ wctype(const char *); - -__END_DECLS - -#endif /* _WCTYPE_H_ */ diff --git a/elc/Cargo.toml b/elc/Cargo.toml index 36ecf36..f59f15e 100644 --- a/elc/Cargo.toml +++ b/elc/Cargo.toml @@ -13,7 +13,7 @@ rlp = { version = "0.5.2", default-features = false } ruint = { version = "1.12.3", default-features = false, features = ["serde"] } hex-literal = "0.4.1" -light-client = { git = "https://github.com/datachainlab/lcp", rev = "v0.2.9", default-features = false } +light-client = { git = "https://github.com/datachainlab/lcp", rev = "v0.2.10", default-features = false } ethereum-light-client-verifier = { git = "https://github.com/datachainlab/ethereum-light-client-rs", rev = "186c5b1d9935f15428ca8b209ad99ed20eaf81c6", default-features = false } besu-qbft-proto = { path = "../proto", default-features = false } diff --git a/elc/src/lib.rs b/elc/src/lib.rs index fd0a6f5..5e86202 100644 --- a/elc/src/lib.rs +++ b/elc/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg_attr(not(feature = "std"), no_std)] +#![no_std] #![allow(clippy::result_large_err)] #![allow(clippy::large_enum_variant)] @@ -16,7 +16,6 @@ pub mod types; mod internal_prelude { pub use alloc::boxed::Box; - pub use alloc::format; pub use alloc::string::{String, ToString}; pub use alloc::vec; pub use alloc::vec::Vec; diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 79a59f7..8429455 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -19,3 +19,4 @@ schemars = { version = "0.8", optional = true } [features] default = ["std"] std = [] +json-schema = ["schemars"] diff --git a/rust-toolchain b/rust-toolchain index cd5e8eb..75a4f2e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2022-10-22 +nightly-2024-09-05 From 5d728464ce4f6688314776f02dc060f0e980800f Mon Sep 17 00:00:00 2001 From: Junichi TANAKA Date: Fri, 27 Sep 2024 17:47:57 +0900 Subject: [PATCH 2/5] Fix lint errors --- e2e/.ignore | 1 + elc/src/client_state.rs | 2 +- elc/src/header.rs | 2 +- proto/src/google.rs | 4 +--- proto/src/lib.rs | 1 + 5 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 e2e/.ignore diff --git a/e2e/.ignore b/e2e/.ignore new file mode 100644 index 0000000..2a9c8fd --- /dev/null +++ b/e2e/.ignore @@ -0,0 +1 @@ +lcp/ diff --git a/elc/src/client_state.rs b/elc/src/client_state.rs index 3fc1436..442d12d 100644 --- a/elc/src/client_state.rs +++ b/elc/src/client_state.rs @@ -62,7 +62,7 @@ impl TryFrom for ClientState { }), trusting_period: Duration::from_secs(value.trusting_period), max_clock_drift: Duration::from_secs(value.max_clock_drift), - execution_verifier: ExecutionVerifier::default(), + execution_verifier: ExecutionVerifier, }) } } diff --git a/elc/src/header.rs b/elc/src/header.rs index 418c576..e838358 100644 --- a/elc/src/header.rs +++ b/elc/src/header.rs @@ -194,7 +194,7 @@ mod tests { #[test] fn test_verify_committed_seals() { - let headers = vec![ + let headers = [ hex!("f9033fa00af93e70b1c6d3974a88a42eb70bb61adbd523bfac0c83027ba4637c52746a0fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ee3353e587cfa91625a1adaef308a726de3803d3a0166ed98eea93ab2b6f6b1a425526994adc2d675bf9a0d77d600ed1e02d8f77dfa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001821d688347b76080846640618bb90147f90144a00000000000000000000000000000000000000000000000000000000000000000f85494647bfdd19655e51e69d35454ff3a92f8828e630294a5c8416b9d13417b45b45ada76408f39d1e504ef94b92e91f4dcc9d28503be521afa2a8fbf3c1acf6094ee3353e587cfa91625a1adaef308a726de3803d3c001f8c9b841bc7633fd65570f610a595086e9a34e5bf6aacfb67b8f8cd01852e6b285147f046a50577b49378b86723ac9b456ef59ef7ab57cda7139d807f10f58e8cb10c67600b841ad1defc2b0b4a48158cff24778bb5ba4d9f373c171022ab0a42e37bdb0d4025718434d303a8d94df56ef9ad5219be9f27b2f67179a7fb82d3323dde29546f9f701b841e233d3670dd97c715f72b440eeb1ccb1e22c8c23f6ab470c46c99c2d0ee6509f0341a42e0e4569782557e93c3815e8ca4294043595f69a90f73f135de8ecf41e00a063746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365880000000000000000").to_vec(), hex!("f90273a00af93e70b1c6d3974a88a42eb70bb61adbd523bfac0c83027ba4637c52746a0fa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794ee3353e587cfa91625a1adaef308a726de3803d3a0166ed98eea93ab2b6f6b1a425526994adc2d675bf9a0d77d600ed1e02d8f77dfa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001821d688347b76080846640618bb87cf87aa00000000000000000000000000000000000000000000000000000000000000000f85494647bfdd19655e51e69d35454ff3a92f8828e630294a5c8416b9d13417b45b45ada76408f39d1e504ef94b92e91f4dcc9d28503be521afa2a8fbf3c1acf6094ee3353e587cfa91625a1adaef308a726de3803d3c001c0a063746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365880000000000000000").to_vec(), ]; diff --git a/proto/src/google.rs b/proto/src/google.rs index 7aeb9cd..269a726 100644 --- a/proto/src/google.rs +++ b/proto/src/google.rs @@ -6,8 +6,6 @@ pub mod protobuf { // source: https://github.com/tokio-rs/prost/blob/master/prost-types/src/lib.rs #[allow(unused_imports)] use core::convert::TryFrom; - use core::i32; - use core::i64; #[allow(unused_imports)] use core::time; @@ -149,7 +147,7 @@ pub mod protobuf { impl Eq for Timestamp {} #[cfg(feature = "std")] - #[allow(clippy::derive_hash_xor_eq)] // Derived logic is correct: comparing the 2 fields for equality + #[allow(clippy::derived_hash_with_manual_eq)] // Derived logic is correct: comparing the 2 fields for equality impl std::hash::Hash for Timestamp { fn hash(&self, state: &mut H) { self.seconds.hash(state); diff --git a/proto/src/lib.rs b/proto/src/lib.rs index d6fdd54..5862cde 100644 --- a/proto/src/lib.rs +++ b/proto/src/lib.rs @@ -6,6 +6,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #![deny(warnings, trivial_casts, trivial_numeric_casts, unused_import_braces)] #![allow(clippy::large_enum_variant)] +#![allow(clippy::too_long_first_doc_paragraph)] #![allow(rustdoc::bare_urls)] #![forbid(unsafe_code)] From 1bc9bbcfea4624db3855e9878a5fb8e22cd31ad3 Mon Sep 17 00:00:00 2001 From: Junichi TANAKA Date: Mon, 30 Sep 2024 14:23:01 +0900 Subject: [PATCH 3/5] add an comment to e2e/.ignore --- e2e/.ignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/e2e/.ignore b/e2e/.ignore index 2a9c8fd..087b007 100644 --- a/e2e/.ignore +++ b/e2e/.ignore @@ -1 +1,8 @@ +# cargo-machete v0.7.0 detects unused dependencies in lcp. +# Thus ignore linting for submodules until resolved the issue. +# --- +# Analyzing dependencies of crates in this directory... +# cargo-machete found the following unused dependencies in this directory: +# light-client -- ./e2e/lcp/modules/light-client/Cargo.toml: +# serde lcp/ From fa22ffa3a2de89dd70000772662da5dcc95908ec Mon Sep 17 00:00:00 2001 From: Junichi TANAKA Date: Wed, 2 Oct 2024 12:04:49 +0900 Subject: [PATCH 4/5] fix: reflect review comments --- e2e/Enclave.mk | 11 +- e2e/Makefile | 4 - e2e/rust-sgx-sdk/dockerfile/02_binutils.sh | 19 --- e2e/rust-sgx-sdk/dockerfile/03_sdk.sh | 20 ---- e2e/rust-sgx-sdk/dockerfile/04_psw.sh | 32 ----- e2e/rust-sgx-sdk/dockerfile/04_psw_rpm.sh | 9 -- e2e/rust-sgx-sdk/dockerfile/05_rust.sh | 8 -- .../dockerfile/Dockerfile.1804.nightly | 42 ------- .../dockerfile/Dockerfile.2004.nightly | 45 ------- .../dockerfile/Dockerfile.centos8.nightly | 34 ------ e2e/rust-sgx-sdk/dockerfile/build.sh | 19 --- e2e/rust-sgx-sdk/dockerfile/push.sh | 22 ---- e2e/rust-sgx-sdk/edl/inc/dirent.h | 39 ------ e2e/rust-sgx-sdk/edl/inc/stat.h | 65 ---------- e2e/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl | 73 ------------ e2e/rust-sgx-sdk/edl/intel/sgx_pthread.edl | 38 ------ .../edl/intel/sgx_tkey_exchange.edl | 49 -------- .../edl/intel/sgx_tprotected_fs.edl | 47 -------- e2e/rust-sgx-sdk/edl/intel/sgx_tstdc.edl | 48 -------- .../edl/intel/sgx_tswitchless.edl | 39 ------ e2e/rust-sgx-sdk/edl/intel/sgx_ttls.edl | 62 ---------- e2e/rust-sgx-sdk/edl/sgx_asyncio.edl | 33 ------ e2e/rust-sgx-sdk/edl/sgx_backtrace.edl | 31 ----- e2e/rust-sgx-sdk/edl/sgx_env.edl | 40 ------- e2e/rust-sgx-sdk/edl/sgx_fd.edl | 57 --------- e2e/rust-sgx-sdk/edl/sgx_file.edl | 66 ----------- e2e/rust-sgx-sdk/edl/sgx_fs.edl | 31 ----- e2e/rust-sgx-sdk/edl/sgx_mem.edl | 40 ------- e2e/rust-sgx-sdk/edl/sgx_net.edl | 41 ------- e2e/rust-sgx-sdk/edl/sgx_net_switchless.edl | 92 --------------- e2e/rust-sgx-sdk/edl/sgx_pipe.edl | 31 ----- e2e/rust-sgx-sdk/edl/sgx_process.edl | 28 ----- e2e/rust-sgx-sdk/edl/sgx_signal.edl | 43 ------- e2e/rust-sgx-sdk/edl/sgx_socket.edl | 111 ------------------ e2e/rust-sgx-sdk/edl/sgx_stdio.edl | 29 ----- e2e/rust-sgx-sdk/edl/sgx_sys.edl | 32 ----- e2e/rust-sgx-sdk/edl/sgx_thread.edl | 32 ----- e2e/rust-sgx-sdk/edl/sgx_time.edl | 29 ----- e2e/rust-sgx-sdk/edl/sgx_tstd.edl | 38 ------ e2e/rust-sgx-sdk/version | 1 - 40 files changed, 1 insertion(+), 1529 deletions(-) delete mode 100644 e2e/rust-sgx-sdk/dockerfile/02_binutils.sh delete mode 100644 e2e/rust-sgx-sdk/dockerfile/03_sdk.sh delete mode 100644 e2e/rust-sgx-sdk/dockerfile/04_psw.sh delete mode 100644 e2e/rust-sgx-sdk/dockerfile/04_psw_rpm.sh delete mode 100644 e2e/rust-sgx-sdk/dockerfile/05_rust.sh delete mode 100644 e2e/rust-sgx-sdk/dockerfile/Dockerfile.1804.nightly delete mode 100644 e2e/rust-sgx-sdk/dockerfile/Dockerfile.2004.nightly delete mode 100644 e2e/rust-sgx-sdk/dockerfile/Dockerfile.centos8.nightly delete mode 100755 e2e/rust-sgx-sdk/dockerfile/build.sh delete mode 100755 e2e/rust-sgx-sdk/dockerfile/push.sh delete mode 100644 e2e/rust-sgx-sdk/edl/inc/dirent.h delete mode 100644 e2e/rust-sgx-sdk/edl/inc/stat.h delete mode 100644 e2e/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl delete mode 100644 e2e/rust-sgx-sdk/edl/intel/sgx_pthread.edl delete mode 100644 e2e/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl delete mode 100644 e2e/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl delete mode 100644 e2e/rust-sgx-sdk/edl/intel/sgx_tstdc.edl delete mode 100644 e2e/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl delete mode 100644 e2e/rust-sgx-sdk/edl/intel/sgx_ttls.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_asyncio.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_backtrace.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_env.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_fd.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_file.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_fs.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_mem.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_net.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_net_switchless.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_pipe.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_process.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_signal.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_socket.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_stdio.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_sys.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_thread.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_time.edl delete mode 100644 e2e/rust-sgx-sdk/edl/sgx_tstd.edl delete mode 100644 e2e/rust-sgx-sdk/version diff --git a/e2e/Enclave.mk b/e2e/Enclave.mk index 33dfac8..4c94e04 100644 --- a/e2e/Enclave.mk +++ b/e2e/Enclave.mk @@ -49,29 +49,20 @@ endif SGX_COMMON_CFLAGS += -fstack-protector -ENCLAVE_CARGO_FEATURES = --features=default -APP_CARGO_FEATURES = --features=default ifeq ($(SGX_PRODUCTION), 1) SGX_ENCLAVE_MODE = "Production Mode" SGX_ENCLAVE_CONFIG = $(SGX_ENCLAVE_CONFIG) SGX_SIGN_KEY = $(SGX_COMMERCIAL_KEY) - CARGO_FEATURES = --features=production else SGX_ENCLAVE_MODE = "Development Mode" SGX_ENCLAVE_CONFIG = "enclave/Enclave.config.xml" SGX_SIGN_KEY = "enclave/Enclave_private.pem" - ifneq ($(SGX_MODE), HW) - ENCLAVE_CARGO_FEATURES = --features=default - APP_CARGO_FEATURES = --features=default,sgx-sw - endif endif ######## CUSTOM Settings ######## CUSTOM_LIBRARY_PATH := ./lib CUSTOM_BIN_PATH := ./bin -CUSTOM_EDL_PATH := ./rust-sgx-sdk/edl -CUSTOM_COMMON_PATH := ./rust-sgx-sdk/common ######## EDL Settings ######## @@ -129,6 +120,6 @@ $(Signed_RustEnclave_Name): $(RustEnclave_Name) .PHONY: enclave enclave: - cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) $(CARGO_FEATURES) + @cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) $(CARGO_FEATURES) @mkdir -p ./lib @cp enclave/target/$(OUTPUT_PATH)/libproxy_enclave.a ./lib/libenclave.a diff --git a/e2e/Makefile b/e2e/Makefile index ee7bf47..fe99a33 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -7,10 +7,6 @@ all: $(Signed_RustEnclave_Name) fmt: @cargo fmt --all && cd ./enclave && cargo fmt --all -.PHONY: docker -docker: - @cd rust-sgx-sdk/dockerfile && docker build --no-cache -t datachainlab/sgx-rust:2004-1.1.5 -f Dockerfile.2004.nightly . - .PHONY: yrly yrly: cd ./relayer && go build -o ../bin/yrly -tags customcert . diff --git a/e2e/rust-sgx-sdk/dockerfile/02_binutils.sh b/e2e/rust-sgx-sdk/dockerfile/02_binutils.sh deleted file mode 100644 index bf52603..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/02_binutils.sh +++ /dev/null @@ -1,19 +0,0 @@ -if [ $BINUTILS_DIST != "SELF_BUILT" ] -then - cd /root && \ - wget https://download.01.org/intel-sgx/sgx-linux/2.17/as.ld.objdump.r4.tar.gz && \ - tar xzf as.ld.objdump.r4.tar.gz && \ - cp -r external/toolset/$BINUTILS_DIST/* /usr/bin/ && \ - rm -rf ./external ./as.ld.objdump.r4.tar.gz -else - curl -o binutils.tar.xz https://ftp.gnu.org/gnu/binutils/binutils-2.36.1.tar.xz && \ - tar xf binutils.tar.xz && \ - cd binutils-2.36.1 && \ - mkdir build && \ - cd build && \ - ../configure --prefix=/usr/local --enable-gold --enable-ld=default --enable-plugins --enable-shared --disable-werror --enable-64-bit-bfd --with-system-zlib && \ - make -j "$(nproc)" && \ - make install && \ - cd /root && \ - rm -rf binutils-gdb -fi diff --git a/e2e/rust-sgx-sdk/dockerfile/03_sdk.sh b/e2e/rust-sgx-sdk/dockerfile/03_sdk.sh deleted file mode 100644 index eb5d015..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/03_sdk.sh +++ /dev/null @@ -1,20 +0,0 @@ -if [ $SDK_DIST != "SELF_BUILT" ]; then - cd /root && \ - curl -o sdk.sh $SDK_URL && \ - chmod a+x /root/sdk.sh && \ - echo -e 'no\n/opt' | ./sdk.sh && \ - echo 'source /opt/sgxsdk/environment' >> /root/.bashrc && \ - cd /root && \ - rm ./sdk.sh -else - cd /root && \ - git clone --recursive https://github.com/intel/linux-sgx && \ - cd linux-sgx && \ - git checkout sgx_2.17.1 && \ - ./download_prebuilt.sh && \ - make -j "$(nproc)" sdk_install_pkg && \ - echo -e 'no\n/opt' | ./linux/installer/bin/sgx_linux_x64_sdk_2.17.101.1.bin && \ - echo 'source /opt/sgxsdk/environment' >> /root/.bashrc && \ - cd /root && \ - rm -rf /root/linux-sgx -fi diff --git a/e2e/rust-sgx-sdk/dockerfile/04_psw.sh b/e2e/rust-sgx-sdk/dockerfile/04_psw.sh deleted file mode 100644 index 2b89a32..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/04_psw.sh +++ /dev/null @@ -1,32 +0,0 @@ -curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add - && \ - add-apt-repository "deb https://download.01.org/intel-sgx/sgx_repo/ubuntu $CODENAME main" && \ - apt-get update && \ - apt-get install -y \ - libsgx-headers=$VERSION \ - libsgx-ae-epid=$VERSION \ - libsgx-ae-le=$VERSION \ - libsgx-ae-pce=$VERSION \ - libsgx-aesm-ecdsa-plugin=$VERSION \ - libsgx-aesm-epid-plugin=$VERSION \ - libsgx-aesm-launch-plugin=$VERSION \ - libsgx-aesm-pce-plugin=$VERSION \ - libsgx-aesm-quote-ex-plugin=$VERSION \ - libsgx-enclave-common=$VERSION \ - libsgx-enclave-common-dev=$VERSION \ - libsgx-epid=$VERSION \ - libsgx-epid-dev=$VERSION \ - libsgx-launch=$VERSION \ - libsgx-launch-dev=$VERSION \ - libsgx-quote-ex=$VERSION \ - libsgx-quote-ex-dev=$VERSION \ - libsgx-uae-service=$VERSION \ - libsgx-urts=$VERSION \ - sgx-aesm-service=$VERSION \ - libsgx-ae-qe3=$DCAP_VERSION \ - libsgx-pce-logic=$DCAP_VERSION \ - libsgx-qe3-logic=$DCAP_VERSION \ - libsgx-ra-network=$DCAP_VERSION \ - libsgx-ra-uefi=$DCAP_VERSION && \ - mkdir /var/run/aesmd && \ - rm -rf /var/lib/apt/lists/* && \ - rm -rf /var/cache/apt/archives/* diff --git a/e2e/rust-sgx-sdk/dockerfile/04_psw_rpm.sh b/e2e/rust-sgx-sdk/dockerfile/04_psw_rpm.sh deleted file mode 100644 index 384dc32..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/04_psw_rpm.sh +++ /dev/null @@ -1,9 +0,0 @@ -cd /root && \ -curl --output /root/repo.tgz $PSW_REPO && \ -cd /root && \ -tar xzf repo.tgz && \ -cd sgx_rpm_local_repo && \ -rpm -ivh ./*.rpm && \ -cd /root && \ -mkdir /var/run/aesmd && \ -rm -rf sgx_rpm_local_repo repo.tgz diff --git a/e2e/rust-sgx-sdk/dockerfile/05_rust.sh b/e2e/rust-sgx-sdk/dockerfile/05_rust.sh deleted file mode 100644 index 2467b9d..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/05_rust.sh +++ /dev/null @@ -1,8 +0,0 @@ -cd /root && \ -curl 'https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init' --output /root/rustup-init && \ -chmod +x /root/rustup-init && \ -echo '1' | /root/rustup-init --default-toolchain ${rust_toolchain} && \ -echo 'source /root/.cargo/env' >> /root/.bashrc && \ -/root/.cargo/bin/rustup component add rust-src rls rust-analysis clippy rustfmt && \ -/root/.cargo/bin/cargo install xargo && \ -rm /root/rustup-init && rm -rf /root/.cargo/registry && rm -rf /root/.cargo/git diff --git a/e2e/rust-sgx-sdk/dockerfile/Dockerfile.1804.nightly b/e2e/rust-sgx-sdk/dockerfile/Dockerfile.1804.nightly deleted file mode 100644 index cda6914..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/Dockerfile.1804.nightly +++ /dev/null @@ -1,42 +0,0 @@ -FROM ubuntu:18.04 - -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt update && apt install -y autoconf automake bison build-essential cmake curl dpkg-dev expect flex gcc-8 gdb git git-core gnupg kmod libboost-system-dev libboost-thread-dev libcurl4-openssl-dev libiptcdata0-dev libjsoncpp-dev liblog4cpp5-dev libprotobuf-c0-dev libprotobuf-dev libssl-dev libtool libxml2-dev ocaml ocamlbuild pkg-config protobuf-compiler python texinfo uuid-dev vim wget dkms gnupg2 apt-transport-https software-properties-common && \ - rm -rf /var/lib/apt/lists/* && \ - rm -rf /var/cache/apt/archives/* - -ENV BINUTILS_DIST="ubuntu18.04" -#ENV BINUTILS_DIST="SELF_BUILT" -ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib -ENV LD_RUN_PATH=/usr/lib:/usr/local/lib - -ADD 02_binutils.sh /root -RUN bash /root/02_binutils.sh - -ENV SDK_DIST="INTEL_BUILT" -ENV SDK_URL="https://download.01.org/intel-sgx/sgx-linux/2.17.1/distro/ubuntu18.04-server/sgx_linux_x64_sdk_2.17.101.1.bin" -#ENV SDK_DIST="SELF_BUILT" -ADD 03_sdk.sh /root -RUN bash /root/03_sdk.sh - -# Sixth, PSW - -ENV CODENAME bionic -ENV VERSION 2.17.100.3-bionic1 -ENV DCAP_VERSION 1.14.100.3-bionic1 - -ADD 04_psw.sh /root -RUN bash /root/04_psw.sh - -# Seventh, Rust - -ENV rust_toolchain nightly-2022-02-23 -ADD 05_rust.sh /root -RUN bash /root/05_rust.sh - -ENV DEBIAN_FRONTEND= -ENV CODENAME= -ENV VERSION= - -WORKDIR /root diff --git a/e2e/rust-sgx-sdk/dockerfile/Dockerfile.2004.nightly b/e2e/rust-sgx-sdk/dockerfile/Dockerfile.2004.nightly deleted file mode 100644 index ab393aa..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/Dockerfile.2004.nightly +++ /dev/null @@ -1,45 +0,0 @@ -FROM ubuntu:20.04 - -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt update && apt install -y unzip lsb-release debhelper cmake reprepro autoconf automake bison build-essential curl dpkg-dev expect flex gcc-8 gdb git git-core gnupg kmod libboost-system-dev libboost-thread-dev libcurl4-openssl-dev libiptcdata0-dev libjsoncpp-dev liblog4cpp5-dev libprotobuf-dev libssl-dev libtool libxml2-dev ocaml ocamlbuild pkg-config protobuf-compiler python texinfo uuid-dev vim wget software-properties-common && \ - rm -rf /var/lib/apt/lists/* - -#20.04 does have gcc-9 -#ADD 01_gcc_8.sh /root -#RUN bash /root/01_gcc_8.sh - -ENV BINUTILS_DIST="ubuntu20.04" -#ENV BINUTILS_DIST="SELF_BUILT" -ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib -ENV LD_RUN_PATH=/usr/lib:/usr/local/lib - -ADD 02_binutils.sh /root -RUN bash /root/02_binutils.sh - -#ENV SDK_DIST="SELF_BUILT" -ENV SDK_DIST="INTEL_BUILT" -ENV SDK_URL="https://download.01.org/intel-sgx/sgx-linux/2.17.1/distro/ubuntu20.04-server/sgx_linux_x64_sdk_2.17.101.1.bin" -ADD 03_sdk.sh /root -RUN bash /root/03_sdk.sh - -# Sixth, PSW - -ENV CODENAME focal -ENV VERSION 2.17.100.3-focal1 -ENV DCAP_VERSION 1.14.100.3-focal1 - -ADD 04_psw.sh /root -RUN bash /root/04_psw.sh - -# Seventh, Rust - -ENV rust_toolchain nightly-2022-02-23 -ADD 05_rust.sh /root -RUN bash /root/05_rust.sh - -ENV DEBIAN_FRONTEND= -ENV CODENAME= -ENV VERSION= - -WORKDIR /root diff --git a/e2e/rust-sgx-sdk/dockerfile/Dockerfile.centos8.nightly b/e2e/rust-sgx-sdk/dockerfile/Dockerfile.centos8.nightly deleted file mode 100644 index aeada92..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/Dockerfile.centos8.nightly +++ /dev/null @@ -1,34 +0,0 @@ -FROM centos:8 - -RUN dnf group install -y 'Development Tools' && \ - dnf --enablerepo=powertools install -y ocaml ocaml-ocamlbuild redhat-rpm-config openssl-devel wget rpm-build git cmake perl python2 libcurl-devel protobuf-devel && \ - alternatives --set python /usr/bin/python2 - -#ADD 01_gcc_8.sh /root -#RUN bash /root/01_gcc_8.sh - -ENV BINUTILS_DIST="centos8" - -ADD 02_binutils.sh /root -RUN bash /root/02_binutils.sh - -ENV SDK_DIST="INTEL_BUILT" -ENV SDK_URL="https://download.01.org/intel-sgx/sgx-linux/2.17.1/distro/centos-stream/sgx_linux_x64_sdk_2.17.101.1.bin" -#ENV SDK_DIST="SELF_BUILT" -ADD 03_sdk.sh /root -RUN bash /root/03_sdk.sh - -ENV PSW_REPO="https://download.01.org/intel-sgx/sgx-linux/2.17/distro/centos-stream/sgx_rpm_local_repo.tgz" -ADD 04_psw_rpm.sh /root -RUN bash /root/04_psw_rpm.sh - -ENV rust_toolchain nightly-2022-02-23 -ADD 05_rust.sh /root -RUN bash /root/05_rust.sh - -ENV rust_toolchain= -ENV CODENAME= -ENV VERSION= -ENV PSW_REPO= - -WORKDIR /root diff --git a/e2e/rust-sgx-sdk/dockerfile/build.sh b/e2e/rust-sgx-sdk/dockerfile/build.sh deleted file mode 100755 index c42e1ee..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/build.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DOCKERFILE_1804_NIGHTLY=Dockerfile.1804.nightly -DOCKERFILE_2004_NIGHTLY=Dockerfile.2004.nightly -DOCKERFILE_centos8_NIGHTLY=Dockerfile.centos8.nightly - -IMAGE_1804_NIGHTLY=baiduxlab/sgx-rust:1804-1.1.5 -IMAGE_2004_NIGHTLY=baiduxlab/sgx-rust:2004-1.1.5 -IMAGE_centos8_NIGHTLY=baiduxlab/sgx-rust:centos8-1.1.5 - -build_one() { - docker build --no-cache -t $1 -f $2 . -} - -build_one ${IMAGE_1804_NIGHTLY} ${DOCKERFILE_1804_NIGHTLY} -build_one ${IMAGE_2004_NIGHTLY} ${DOCKERFILE_2004_NIGHTLY} -build_one ${IMAGE_centos8_NIGHTLY} ${DOCKERFILE_centos8_NIGHTLY} diff --git a/e2e/rust-sgx-sdk/dockerfile/push.sh b/e2e/rust-sgx-sdk/dockerfile/push.sh deleted file mode 100755 index 583d0b0..0000000 --- a/e2e/rust-sgx-sdk/dockerfile/push.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DOCKERFILE_1804_NIGHTLY=Dockerfile.1804.nightly -DOCKERFILE_2004_NIGHTLY=Dockerfile.2004.nightly -DOCKERFILE_centos8_NIGHTLY=Dockerfile.centos8.nightly - -IMAGE_1804_NIGHTLY=baiduxlab/sgx-rust:1804-1.1.5 -IMAGE_2004_NIGHTLY=baiduxlab/sgx-rust:2004-1.1.5 -IMAGE_centos8_NIGHTLY=baiduxlab/sgx-rust:centos8-1.1.5 - -push_one() { - docker push $1 -} - -push_one ${IMAGE_1804_NIGHTLY} -push_one ${IMAGE_2004_NIGHTLY} -push_one ${IMAGE_centos8_NIGHTLY} - -docker tag ${IMAGE_1804_NIGHTLY} baiduxlab/sgx-rust:latest -push_one baiduxlab/sgx-rust:latest diff --git a/e2e/rust-sgx-sdk/edl/inc/dirent.h b/e2e/rust-sgx-sdk/edl/inc/dirent.h deleted file mode 100644 index be63f83..0000000 --- a/e2e/rust-sgx-sdk/edl/inc/dirent.h +++ /dev/null @@ -1,39 +0,0 @@ -// 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.. - -#ifndef _EDL_DIRENT_H -#define _EDL_DIRENT_H - -struct dirent_t -{ - uint64_t d_ino; - int64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; -}; - -struct dirent64_t -{ - uint64_t d_ino; - int64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; -}; - -#endif diff --git a/e2e/rust-sgx-sdk/edl/inc/stat.h b/e2e/rust-sgx-sdk/edl/inc/stat.h deleted file mode 100644 index 7f04c3c..0000000 --- a/e2e/rust-sgx-sdk/edl/inc/stat.h +++ /dev/null @@ -1,65 +0,0 @@ -// 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.. - -#ifndef _EDL_STAT_H -#define _EDL_STAT_H - -struct stat_t -{ - uint64_t st_dev; - uint64_t st_ino; - uint64_t st_nlink; - uint32_t st_mode; - uint32_t st_uid; - uint32_t st_gid; - int __pad0; - uint64_t st_rdev; - uint64_t st_size; - int64_t st_blksize; - int64_t st_blocks; - int64_t st_atime; - int64_t st_atime_nsec; - int64_t st_mtime; - int64_t st_mtime_nsec; - int64_t st_ctime; - int64_t st_ctime_nsec; - int64_t __reserved[3]; -}; - -struct stat64_t -{ - uint64_t st_dev; - uint64_t st_ino; - uint64_t st_nlink; - uint32_t st_mode; - uint32_t st_uid; - uint32_t st_gid; - int __pad0; - uint64_t st_rdev; - uint64_t st_size; - int64_t st_blksize; - int64_t st_blocks; - int64_t st_atime; - int64_t st_atime_nsec; - int64_t st_mtime; - int64_t st_mtime_nsec; - int64_t st_ctime; - int64_t st_ctime_nsec; - int64_t __reserved[3]; -}; - -#endif diff --git a/e2e/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl b/e2e/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl deleted file mode 100644 index 7c5c0d8..0000000 --- a/e2e/rust-sgx-sdk/edl/intel/sgx_dcap_tvl.edl +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2011-2020 Intel Corporation. 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 Intel Corporation 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. - * - */ - -enclave { - - include "sgx_qve_header.h" - include "sgx_ql_quote.h" - - - trusted { - - /** - * Verify QvE Report and Identity - * - * @param p_quote[IN] - Pointer to SGX Quote. - * @param quote_size[IN] - Size of the buffer pointed to by p_quote (in bytes). - * @param p_qve_report_info[IN] - The output of API "sgx_qv_verify_quote", it should contain QvE report and nonce - * @param expiration_check_date[IN] - This is the date to verify QvE report data, you should use same value for this API and "sgx_qv_verify_quote" - * @param collateral_expiration_status[IN] - The output of API "sgx_qv_verify_quote" about quote verification collateral's expiration status - * @param quote_verification_result[IN] - The output of API "sgx_qv_verify_quote" about quote verification result - * @param p_supplemental_data[IN] - The output of API "sgx_qv_verify_quote", the pointer to supplemental data - * @param supplemental_data_size[IN] - Size of the buffer pointed to by p_quote (in bytes) - * @param qve_isvsvn_threshold [IN] - The threshold of QvE ISVSVN, the ISVSVN of QvE used to verify quote must be greater or equal to this threshold. You can get latest QvE ISVSVN in QvE Identity (JSON) from Intel PCS. - * - * @return Status code of the operation, one of: - * - SGX_QL_SUCCESS - * - SGX_QL_ERROR_INVALID_PARAMETER - * - SGX_QL_ERROR_REPORT // Error when verifying QvE report - * - SGX_QL_ERROR_UNEXPECTED // Error when comparing QvE report data - * - SGX_QL_QVEIDENTITY_MISMATCH // Error when comparing QvE identity - * - SGX_QL_QVE_OUT_OF_DATE // QvE ISVSVN is smaller than input QvE ISV SVN threshold - **/ - - public quote3_error_t sgx_tvl_verify_qve_report_and_identity( - [in, size=quote_size] const uint8_t *p_quote, - uint32_t quote_size, - [in, count=1] const sgx_ql_qe_report_info_t *p_qve_report_info, - time_t expiration_check_date, - uint32_t collateral_expiration_status, - sgx_ql_qv_result_t quote_verification_result, - [in, size=supplemental_data_size] const uint8_t *p_supplemental_data, - uint32_t supplemental_data_size, - sgx_isv_svn_t qve_isvsvn_threshold); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/intel/sgx_pthread.edl b/e2e/rust-sgx-sdk/edl/intel/sgx_pthread.edl deleted file mode 100644 index 7a097a7..0000000 --- a/e2e/rust-sgx-sdk/edl/intel/sgx_pthread.edl +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2011-2019 Intel Corporation. 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 Intel Corporation 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. - * - */ - -enclave { - untrusted { - [cdecl] int pthread_wait_timeout_ocall (unsigned long long waiter, unsigned long long timeout); - [cdecl] int pthread_create_ocall(unsigned long long self); - [cdecl] int pthread_wakeup_ocall(unsigned long long waiter); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl b/e2e/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl deleted file mode 100644 index 3e18c89..0000000 --- a/e2e/rust-sgx-sdk/edl/intel/sgx_tkey_exchange.edl +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2011-2019 Intel Corporation. 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 Intel Corporation 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. - * - */ - -enclave { - trusted { - public sgx_status_t sgx_ra_get_ga(sgx_ra_context_t context, - [out] sgx_ec256_public_t *g_a); - - public sgx_status_t sgx_ra_proc_msg2_trusted(sgx_ra_context_t context, - [in]const sgx_ra_msg2_t *p_msg2, /*copy msg2 except quote into enclave */ - [in] const sgx_target_info_t *p_qe_target, - [out] sgx_report_t *p_report, - [out] sgx_quote_nonce_t *p_nonce); - - public sgx_status_t sgx_ra_get_msg3_trusted(sgx_ra_context_t context, - uint32_t quote_size, - [in]sgx_report_t* qe_report, - [user_check]sgx_ra_msg3_t *p_msg3, - uint32_t msg3_size); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl b/e2e/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl deleted file mode 100644 index 2dfad37..0000000 --- a/e2e/rust-sgx-sdk/edl/intel/sgx_tprotected_fs.edl +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2011-2019 Intel Corporation. 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 Intel Corporation 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. - * - */ - -enclave { - from "sgx_tstdc.edl" import *; - untrusted { - void* u_sgxprotectedfs_exclusive_file_open([in, string] const char* filename, uint8_t read_only, [out] int64_t* file_size, [out] int32_t* error_code); - uint8_t u_sgxprotectedfs_check_if_file_exists([in, string] const char* filename); - int32_t u_sgxprotectedfs_fread_node([user_check] void* f, uint64_t node_number, [out, size=node_size] uint8_t* buffer, uint32_t node_size); - int32_t u_sgxprotectedfs_fwrite_node([user_check] void* f, uint64_t node_number, [in, size=node_size] uint8_t* buffer, uint32_t node_size); - int32_t u_sgxprotectedfs_fclose([user_check] void* f); - uint8_t u_sgxprotectedfs_fflush([user_check] void* f); - int32_t u_sgxprotectedfs_remove([in, string] const char* filename); - - void* u_sgxprotectedfs_recovery_file_open([in, string] const char* filename); - uint8_t u_sgxprotectedfs_fwrite_recovery_node([user_check] void* f, [in, count=data_length] uint8_t* data, uint32_t data_length); - int32_t u_sgxprotectedfs_do_file_recovery([in, string] const char* filename, [in, string] const char* recovery_filename, uint32_t node_size); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/intel/sgx_tstdc.edl b/e2e/rust-sgx-sdk/edl/intel/sgx_tstdc.edl deleted file mode 100644 index 4124deb..0000000 --- a/e2e/rust-sgx-sdk/edl/intel/sgx_tstdc.edl +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2011-2019 Intel Corporation. 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 Intel Corporation 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. - * - */ - -enclave { - untrusted { - [cdecl] void sgx_oc_cpuidex([out] int cpuinfo[4], int leaf, int subleaf); - - /* Go outside and wait on my untrusted event */ - [cdecl] int sgx_thread_wait_untrusted_event_ocall([user_check] const void *self); - - /* Wake a thread waiting on its untrusted event */ - [cdecl] int sgx_thread_set_untrusted_event_ocall([user_check] const void *waiter); - - /* Wake a thread waiting on its untrusted event, and wait on my untrusted event */ - [cdecl] int sgx_thread_setwait_untrusted_events_ocall([user_check] const void *waiter, [user_check] const void *self); - - /* Wake multiple threads waiting on their untrusted events */ - [cdecl] int sgx_thread_set_multiple_untrusted_events_ocall([in, count = total] const void **waiters, size_t total); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl b/e2e/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl deleted file mode 100644 index a20669a..0000000 --- a/e2e/rust-sgx-sdk/edl/intel/sgx_tswitchless.edl +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2011-2019 Intel Corporation. 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 Intel Corporation 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. - * - */ - -enclave { - - trusted { - public sgx_status_t sl_init_switchless([user_check]void* sl_data); - public sgx_status_t sl_run_switchless_tworker(); - }; - -}; diff --git a/e2e/rust-sgx-sdk/edl/intel/sgx_ttls.edl b/e2e/rust-sgx-sdk/edl/intel/sgx_ttls.edl deleted file mode 100644 index ca0906f..0000000 --- a/e2e/rust-sgx-sdk/edl/intel/sgx_ttls.edl +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2011-2021 Intel Corporation. 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 Intel Corporation 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. - * - */ - -enclave{ - include "sgx_report.h" - include "sgx_qve_header.h" - include "sgx_ql_lib_common.h" - include "sgx_ql_quote.h" - - untrusted { - quote3_error_t sgx_tls_get_qe_target_info_ocall([size = target_info_size, out] sgx_target_info_t *p_target_info, - size_t target_info_size); - - quote3_error_t sgx_tls_get_quote_size_ocall([out] uint32_t *p_quote_size); - - quote3_error_t sgx_tls_get_quote_ocall([size = report_size, in] sgx_report_t* p_report, - size_t report_size, - [size = quote_size, out] uint8_t *p_quote, - uint32_t quote_size); - - quote3_error_t sgx_tls_get_supplemental_data_size_ocall([out] uint32_t *p_supplemental_data_size); - - quote3_error_t sgx_tls_verify_quote_ocall( - [size = quote_size, in] const uint8_t *p_quote, - uint32_t quote_size, - time_t expiration_check_date, - [out] sgx_ql_qv_result_t *p_quote_verification_result, - [size = qve_report_info_size, in, out] sgx_ql_qe_report_info_t *p_qve_report_info, - size_t qve_report_info_size, - [size = supplemental_data_size, out] uint8_t *p_supplemental_data, - uint32_t supplemental_data_size); - - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_asyncio.edl b/e2e/rust-sgx-sdk/edl/sgx_asyncio.edl deleted file mode 100644 index f463738..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_asyncio.edl +++ /dev/null @@ -1,33 +0,0 @@ -// 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/epoll.h" - include "poll.h" - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - int u_poll_ocall([out] int *error, [in, out, count=nfds] struct pollfd *fds, nfds_t nfds, int timeout); - int u_epoll_create1_ocall([out] int *error, int flags); - 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); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_backtrace.edl b/e2e/rust-sgx-sdk/edl/sgx_backtrace.edl deleted file mode 100644 index 4a9e7ef..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_backtrace.edl +++ /dev/null @@ -1,31 +0,0 @@ -// 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 *; - from "sgx_file.edl" import *; - from "sgx_mem.edl" import *; - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - /* define OCALLs here. */ - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_env.edl b/e2e/rust-sgx-sdk/edl/sgx_env.edl deleted file mode 100644 index d4a77cc..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_env.edl +++ /dev/null @@ -1,40 +0,0 @@ -// 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. */ - }; - - untrusted { - char **u_environ_ocall(); - 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(); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_fd.edl b/e2e/rust-sgx-sdk/edl/sgx_fd.edl deleted file mode 100644 index cd668b7..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_fd.edl +++ /dev/null @@ -1,57 +0,0 @@ -// 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 "inc/stat.h" - include "sys/uio.h" - include "time.h" - - from "sgx_mem.edl" import *; - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - size_t u_read_ocall([out] int *error, int fd, [user_check] void *buf, size_t count); - size_t u_pread64_ocall([out] int *error, int fd, [user_check] void *buf, size_t count, int64_t offset); - size_t u_readv_ocall([out] int *error, int fd, [in, count=iovcnt] const struct iovec *iov, int iovcnt); - size_t u_preadv64_ocall([out] int *error, int fd, [in, count=iovcnt] const struct iovec *iov, int iovcnt, int64_t offset); - - size_t u_write_ocall([out] int *error, int fd, [user_check] const void *buf, size_t count); - size_t u_pwrite64_ocall([out] int *error, int fd, [user_check] const void *buf, size_t count, int64_t offset); - size_t u_writev_ocall([out] int *error, int fd, [in, count=iovcnt] const struct iovec *iov, int iovcnt); - size_t u_pwritev64_ocall([out] int *error, int fd, [in, count=iovcnt] const struct iovec *iov, int iovcnt, int64_t offset); - - size_t u_sendfile_ocall([out] int *error, int out_fd, int in_fd, [in, out] int64_t *offset, size_t count); - size_t u_copy_file_range_ocall([out] int *error, int fd_in, [in, out] int64_t *off_in, int fd_out, [in, out] int64_t *off_out, size_t len, unsigned int flags); - size_t u_splice_ocall([out] int *error, int fd_in, [in, out] int64_t *off_in, int fd_out, [in, out] int64_t *off_out, size_t len, unsigned int flags); - - int u_fcntl_arg0_ocall([out] int *error, int fd, int cmd); - int u_fcntl_arg1_ocall([out] int *error, int fd, int cmd, int arg); - 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_isatty_ocall([out] int *error, int fd); - int u_dup_ocall([out] int *error, int oldfd); - int u_eventfd_ocall([out] int *error, unsigned int initval, int flags); - - int u_futimens_ocall([out] int *error, int fd, [in, count=2] const struct timespec *times); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_file.edl b/e2e/rust-sgx-sdk/edl/sgx_file.edl deleted file mode 100644 index c70ec59..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_file.edl +++ /dev/null @@ -1,66 +0,0 @@ -// 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 "inc/stat.h" - include "inc/dirent.h" - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - int u_open_ocall([out] int *error, [in, string] const char *pathname, int flags); - int u_open64_ocall([out] int *error, [in, string] const char *path, int oflag, int mode); - int u_openat_ocall([out] int *error, int dirfd, [in, string] const char *pathname, int flags); - - int u_fstat_ocall([out] int *error, int fd, [out] struct stat_t *buf); - int u_fstat64_ocall([out] int *error, int fd, [out] struct stat64_t *buf); - int u_stat_ocall([out] int *error, [in, string] const char *path, [out] struct stat_t *buf); - int u_stat64_ocall([out] int *error, [in, string] const char *path, [out] struct stat64_t *buf); - int u_lstat_ocall([out] int *error, [in, string] const char *path, [out] struct stat_t *buf); - int u_lstat64_ocall([out] int *error, [in, string] const char *path, [out] struct stat64_t *buf); - uint64_t u_lseek_ocall([out] int *error, int fd, int64_t offset, int whence); - int64_t u_lseek64_ocall([out] int *error, int fd, int64_t offset, int whence); - int u_ftruncate_ocall([out] int *error, int fd, int64_t length); - int u_ftruncate64_ocall([out] int *error, int fd, int64_t length); - int u_truncate_ocall([out] int *error, [in, string] const char *path, int64_t length); - int u_truncate64_ocall([out] int *error, [in, string] const char *path, int64_t length); - - int u_fsync_ocall([out] int *error, int fd); - int u_fdatasync_ocall([out] int *error, int fd); - int u_fchmod_ocall([out] int *error, int fd, uint32_t mode); - int u_unlink_ocall([out] int *error, [in, string] const char *pathname); - int u_link_ocall([out] int *error, [in, string] const char *oldpath, [in, string] const char *newpath); - int u_unlinkat_ocall([out] int *error, int dirfd, [in, string] const char *pathname, int flags); - int u_linkat_ocall([out] int *error, int olddirfd, [in, string] const char *oldpath, int newdirfd, [in, string] const char *newpath, int flags); - int u_rename_ocall([out] int *error, [in, string] const char *oldpath, [in, string] const char *newpath); - 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); - 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_fdopendir_ocall([out] int *error, int fd); - void *u_opendir_ocall([out] int *error, [in, string] const char *pathname); - 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); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_fs.edl b/e2e/rust-sgx-sdk/edl/sgx_fs.edl deleted file mode 100644 index 2618be9..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_fs.edl +++ /dev/null @@ -1,31 +0,0 @@ -// 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_mem.edl" import *; - from "sgx_fd.edl" import *; - from "sgx_file.edl" import *; - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - /* define OCALLs here. */ - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_mem.edl b/e2e/rust-sgx-sdk/edl/sgx_mem.edl deleted file mode 100644 index db55802..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_mem.edl +++ /dev/null @@ -1,40 +0,0 @@ -// 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 { - /* define ECALLs here. */ - }; - - untrusted { - void *u_malloc_ocall([out] int *error, size_t size); - void u_free_ocall([user_check] void *p); - - void *u_mmap_ocall([out] int *error, - [user_check] void *start, - size_t length, - int prot, - int flags, - int fd, - int64_t offset); - int u_munmap_ocall([out] int *error, [user_check] void *start, size_t length); - - 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); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_net.edl b/e2e/rust-sgx-sdk/edl/sgx_net.edl deleted file mode 100644 index a803b53..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_net.edl +++ /dev/null @@ -1,41 +0,0 @@ -// 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 *; - from "sgx_time.edl" import *; - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - 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); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_net_switchless.edl b/e2e/rust-sgx-sdk/edl/sgx_net_switchless.edl deleted file mode 100644 index ec5c500..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_net_switchless.edl +++ /dev/null @@ -1,92 +0,0 @@ -// 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 "poll.h" - from "sgx_fs.edl" import *; - from "sgx_time.edl" import *; - from "sgx_mem.edl" import *; - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - - int u_net_socket_ocall([out] int *error, int domain, int ty, int protocol) transition_using_threads; - int u_net_socketpair_ocall([out] int *error, int domain, int ty, int protocol, [out] int sv[2]) transition_using_threads; - int u_net_bind_ocall([out] int *error, int sockfd, [in, size=addrlen] const struct sockaddr *addr, socklen_t addrlen) transition_using_threads; - int u_net_listen_ocall([out] int *error, int sockfd, int backlog) transition_using_threads; - int u_net_accept4_ocall([out] int *error, - int sockfd, - [in, out, size=addrlen_in] struct sockaddr *addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out, - int flags) transition_using_threads; - int u_net_connect_ocall([out] int *error, - int sockfd, - [in, size=addrlen] const struct sockaddr *addr, - socklen_t addrlen) transition_using_threads; - size_t u_net_recv_ocall([out] int *error, int sockfd, [out, size=len] void *buf, size_t len, int flags) transition_using_threads; - size_t u_net_recvfrom_ocall([out] int *error, - int sockfd, - [out, size=len] void *buf, - size_t len, - int flags, - [out, size=addrlen_in] struct sockaddr *src_addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out) transition_using_threads; - size_t u_net_recvmsg_ocall([out] int *error, int sockfd, [in, out] struct msghdr *msg, int flags) transition_using_threads; - size_t u_net_send_ocall([out] int *error, int sockfd, [in, size=len] const void *buf, size_t len, int flags) transition_using_threads; - size_t u_net_sendto_ocall([out] int *error, - int sockfd, - [in, size=len] const void *buf, - size_t len, - int flags, - [in, size=addrlen] const struct sockaddr *dest_addr, - socklen_t addrlen) transition_using_threads; - size_t u_sendmsg_ocall([out] int *error, int sockfd, [in] const struct msghdr *msg, int flags) transition_using_threads; - int u_net_getsockopt_ocall([out] int *error, - int sockfd, - int level, - int optname, - [out, size=optlen_in] void *optval, - socklen_t optlen_in, - [out] socklen_t *optlen_out) transition_using_threads; - int u_net_setsockopt_ocall([out] int *error, - int sockfd, - int level, - int optname, - [in, size=optlen] const void *optval, - socklen_t optlen) transition_using_threads; - int u_net_getsockname_ocall([out] int *error, - int sockfd, - [out, size=addrlen_in] struct sockaddr *addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out) transition_using_threads; - int u_net_getpeername_ocall([out] int *error, - int sockfd, - [out, size=addrlen_in] struct sockaddr *addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out) transition_using_threads; - int u_net_shutdown_ocall([out] int *error, int sockfd, int how) transition_using_threads; - int u_net_ioctl_ocall([out] int *error, int fd, int request, [in, out] int *arg) transition_using_threads; - int u_net_poll_ocall([out] int *error, [in, out, count=nfds] struct pollfd *fds, nfds_t nfds, int timeout) transition_using_threads; - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_pipe.edl b/e2e/rust-sgx-sdk/edl/sgx_pipe.edl deleted file mode 100644 index 00c12f5..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_pipe.edl +++ /dev/null @@ -1,31 +0,0 @@ -// 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 *; - from "sgx_asyncio.edl" import *; - - trusted { - /* define ECALLs here. */ - }; - - 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); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_process.edl b/e2e/rust-sgx-sdk/edl/sgx_process.edl deleted file mode 100644 index 69123df..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_process.edl +++ /dev/null @@ -1,28 +0,0 @@ -// 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 { - /* define ECALLs here. */ - - }; - - untrusted { - int u_getpid_ocall(); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_signal.edl b/e2e/rust-sgx-sdk/edl/sgx_signal.edl deleted file mode 100644 index fd9b0f0..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_signal.edl +++ /dev/null @@ -1,43 +0,0 @@ -// 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 "signal.h" - - trusted { - /* define ECALLs here. */ - public int t_signal_handler_ecall([in]const siginfo_t *info); - }; - - untrusted { - int u_sigaction_ocall([out]int *error, - int signum, - [in] const struct sigaction *act, - [out] struct sigaction *oldact, - uint64_t enclave_id); - - int u_sigprocmask_ocall([out]int *error, - int signum, - [in] const sigset_t *set, - [out] sigset_t *oldset); - - int u_raise_ocall(int signum) allow(t_signal_handler_ecall); - - void u_signal_clear_ocall(uint64_t enclave_id); - }; -}; - diff --git a/e2e/rust-sgx-sdk/edl/sgx_socket.edl b/e2e/rust-sgx-sdk/edl/sgx_socket.edl deleted file mode 100644 index 6fc8ff7..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_socket.edl +++ /dev/null @@ -1,111 +0,0 @@ -// 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" - - from "sgx_mem.edl" import *; - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - int u_socket_ocall([out] int *error, int domain, int ty, int protocol); - int u_socketpair_ocall([out] int *error, int domain, int ty, int protocol, [out] int sv[2]); - int u_bind_ocall([out] int *error, int sockfd, [in, size=addrlen] const struct sockaddr *addr, socklen_t addrlen); - int u_listen_ocall([out] int *error, int sockfd, int backlog); - int u_accept_ocall([out] int *error, - int sockfd, - [in, out, size=addrlen_in] struct sockaddr *addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out); - int u_accept4_ocall([out] int *error, - int sockfd, - [in, out, size=addrlen_in] struct sockaddr *addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out, - int flags); - int u_connect_ocall([out] int *error, - int sockfd, - [in, size=addrlen] const struct sockaddr *addr, - socklen_t addrlen); - size_t u_recv_ocall([out] int *error, int sockfd,[user_check] void *buf, size_t len, int flags); - size_t u_recvfrom_ocall([out] int *error, - int sockfd, - [user_check] void *buf, - size_t len, - int flags, - [out, size=addrlen_in] struct sockaddr *src_addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out); - size_t u_recvmsg_ocall([out] int *error, - int sockfd, - [out, size=msg_namelen] void *msg_name, - socklen_t msg_namelen, - [out] socklen_t* msg_namelen_out, - [in, count=msg_iovlen] struct iovec* msg_iov, - size_t msg_iovlen, - [out, size=msg_controllen] void *msg_control, - size_t msg_controllen, - [out] size_t* msg_controllen_out, - [out] int* msg_flags, - int flags); - size_t u_send_ocall([out] int *error, int sockfd, [user_check] const void *buf, size_t len, int flags); - size_t u_sendto_ocall([out] int *error, - int sockfd, - [user_check] const void *buf, - size_t len, - int flags, - [in, size=addrlen] const struct sockaddr *dest_addr, - socklen_t addrlen); - size_t u_sendmsg_ocall([out] int *error, - int sockfd, - [in, size=msg_namelen] const void* msg_name, - socklen_t msg_namelen, - [in, count=msg_iovlen] const struct iovec* msg_iov, - size_t msg_iovlen, - [in, size=msg_controllen] const void* msg_control, - size_t msg_controllen, - int flags); - int u_getsockopt_ocall([out] int *error, - int sockfd, - int level, - int optname, - [out, size=optlen_in] void *optval, - socklen_t optlen_in, - [out] socklen_t *optlen_out); - int u_setsockopt_ocall([out] int *error, - int sockfd, - int level, - int optname, - [in, size=optlen] const void *optval, - socklen_t optlen); - int u_getsockname_ocall([out] int *error, - int sockfd, - [out, size=addrlen_in] struct sockaddr *addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out); - int u_getpeername_ocall([out] int *error, - int sockfd, - [out, size=addrlen_in] struct sockaddr *addr, - socklen_t addrlen_in, - [out] socklen_t *addrlen_out); - int u_shutdown_ocall([out] int *error, int sockfd, int how); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_stdio.edl b/e2e/rust-sgx-sdk/edl/sgx_stdio.edl deleted file mode 100644 index 5367d9a..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_stdio.edl +++ /dev/null @@ -1,29 +0,0 @@ -// 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. */ - }; - - untrusted { - /* define OCALLs here. */ - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_sys.edl b/e2e/rust-sgx-sdk/edl/sgx_sys.edl deleted file mode 100644 index bc74b96..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_sys.edl +++ /dev/null @@ -1,32 +0,0 @@ -// 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 "sched.h" - - trusted { - /* define ECALLs here. */ - }; - - 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); - int u_sched_setaffinity_ocall([out] int *error, pid_t pid, size_t cpusetsize, [in, size=cpusetsize] cpu_set_t *mask); - int u_sched_getaffinity_ocall([out] int *error, pid_t pid, size_t cpusetsize, [out, size=cpusetsize] cpu_set_t *mask); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_thread.edl b/e2e/rust-sgx-sdk/edl/sgx_thread.edl deleted file mode 100644 index 71512f0..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_thread.edl +++ /dev/null @@ -1,32 +0,0 @@ -// 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" - - from "intel/sgx_pthread.edl" import *; - from "sgx_sys.edl" import *; - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - 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/e2e/rust-sgx-sdk/edl/sgx_time.edl b/e2e/rust-sgx-sdk/edl/sgx_time.edl deleted file mode 100644 index adeeecc..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_time.edl +++ /dev/null @@ -1,29 +0,0 @@ -// 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" - - trusted { - /* define ECALLs here. */ - }; - - untrusted { - int u_clock_gettime_ocall([out] int *error, int clk_id, [out] struct timespec *tp); - }; -}; diff --git a/e2e/rust-sgx-sdk/edl/sgx_tstd.edl b/e2e/rust-sgx-sdk/edl/sgx_tstd.edl deleted file mode 100644 index 9b74272..0000000 --- a/e2e/rust-sgx-sdk/edl/sgx_tstd.edl +++ /dev/null @@ -1,38 +0,0 @@ -// 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 *; - - trusted { - /* define ECALLs here. */ - public void t_global_init_ecall(uint64_t id, [in, size=len] const uint8_t *path, size_t len); - public void t_global_exit_ecall(); - }; - - 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, [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, - [in] const struct timespec *timeout); - }; -}; diff --git a/e2e/rust-sgx-sdk/version b/e2e/rust-sgx-sdk/version deleted file mode 100644 index 34d7b1b..0000000 --- a/e2e/rust-sgx-sdk/version +++ /dev/null @@ -1 +0,0 @@ -c3d82372dff81e5bafb07f71bc8ad532d06b504e From 70106c3b5f83db74958ed86e6ce19e66771d5188 Mon Sep 17 00:00:00 2001 From: Junichi TANAKA Date: Wed, 2 Oct 2024 14:03:26 +0900 Subject: [PATCH 5/5] fix: remove unused reference of CARGO_FEATURES --- e2e/Enclave.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/Enclave.mk b/e2e/Enclave.mk index 4c94e04..ac6631d 100644 --- a/e2e/Enclave.mk +++ b/e2e/Enclave.mk @@ -120,6 +120,6 @@ $(Signed_RustEnclave_Name): $(RustEnclave_Name) .PHONY: enclave enclave: - @cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) $(CARGO_FEATURES) + @cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) @mkdir -p ./lib @cp enclave/target/$(OUTPUT_PATH)/libproxy_enclave.a ./lib/libenclave.a