From 124a396aa0f4713ee860b21b2aa0963cb6ec9f05 Mon Sep 17 00:00:00 2001 From: Reuven Podmazo Date: Tue, 26 May 2020 14:23:13 +0300 Subject: [PATCH] changed up a lot of import resolutions to make everything work, including in IDEs also ran cargo fmt on a few files --- cosmwasm/lib/wasmi-runtime/Cargo.lock | 648 ++++++++++-------- cosmwasm/lib/wasmi-runtime/Cargo.toml | 40 +- cosmwasm/lib/wasmi-runtime/src/attestation.rs | 10 +- cosmwasm/lib/wasmi-runtime/src/cert.rs | 215 +++--- cosmwasm/lib/wasmi-runtime/src/hex.rs | 8 +- cosmwasm/lib/wasmi-runtime/src/imports.rs | 37 +- cosmwasm/lib/wasmi-runtime/src/lib.rs | 20 +- cosmwasm/lib/wasmi-runtime/src/results.rs | 1 - cosmwasm/lib/wasmi-runtime/src/utils.rs | 5 +- rust-toolchain | 2 +- 10 files changed, 547 insertions(+), 439 deletions(-) diff --git a/cosmwasm/lib/wasmi-runtime/Cargo.lock b/cosmwasm/lib/wasmi-runtime/Cargo.lock index 575eb5fce..c19b0c947 100644 --- a/cosmwasm/lib/wasmi-runtime/Cargo.lock +++ b/cosmwasm/lib/wasmi-runtime/Cargo.lock @@ -4,217 +4,195 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "autocfg" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" [[package]] name = "autocfg" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "base64" version = "0.10.1" source = "git+https://github.com/mesalock-linux/rust-base64-sgx#cdc4f4ab79522f75e4d178c3dcc0b1f0770c6a86" dependencies = [ - "sgx_tstd", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "bech32" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdcf67bb7ba7797a081cd19009948ab533af7c355d5caf1d08c777582d351e9c" [[package]] name = "bit-vec" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3" [[package]] name = "bitflags" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array", + "block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "block-padding" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" dependencies = [ - "byte-tools", + "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "byte-tools" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "cbindgen" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db2df1ebc842c41fd2c4ae5b5a577faf63bd5151b953db752fc686812bee318" dependencies = [ - "clap", - "log", - "proc-macro2", - "quote", - "serde 1.0.110", - "serde_json 1.0.53", - "syn", - "tempfile", - "toml", + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dae9c4b8fedcae85592ba623c4fd08cfdab3e3b72d6df780c6ead964a69bfff" [[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "chrono" version = "0.4.11" source = "git+https://github.com/mesalock-linux/chrono-sgx#43d452d9dc6fc3d2ef90bf1901486d7093cdb804" dependencies = [ - "num-integer 0.1.41", - "num-traits 0.2.10", - "sgx_tstd", + "num-integer 0.1.41 (git+https://github.com/mesalock-linux/num-integer-sgx)", + "num-traits 0.2.10 (git+https://github.com/mesalock-linux/num-traits-sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "clap" -version = "2.33.0" +version = "2.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ctor" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6b25ee9ac1995c54d7adb2eff8cfffb7260bc774fb63c601ec65467f43cd9d" dependencies = [ - "quote", - "syn", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "derive_more" -version = "0.99.5" +version = "0.99.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2323f3f47db9a0e77ce7a300605d8d2098597fc451ed1a97bb1f6411bb550a7" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "digest" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array", + "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "either" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "enclave-ffi-types" version = "0.1.0" dependencies = [ - "cbindgen", - "derive_more", - "secp256k1", - "thiserror", + "cbindgen 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.7 (registry+https://github.com/rust-lang/crates.io-index)", + "secp256k1 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "generic-array" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" dependencies = [ - "typenum", + "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "getrandom" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ - "cfg-if", - "libc", - "wasi", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -222,31 +200,28 @@ name = "hashbrown_tstd" version = "0.7.1" source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hermit-abi" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" dependencies = [ - "libc", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "httparse" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" [[package]] name = "itertools" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" dependencies = [ - "either", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -254,59 +229,53 @@ name = "itoa" version = "0.4.5" source = "git+https://github.com/mesalock-linux/itoa-sgx.git#a49118cf1bc9ab4599c1f2b2cccc4f3f8c0ec38a" dependencies = [ - "sgx_tstd", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "itoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.69" +version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" [[package]] name = "libm" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "memory_units" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "num" version = "0.2.0" source = "git+https://github.com/mesalock-linux/num-sgx#22645415542cc67551890dfdd34f4d5638b9ec78" dependencies = [ - "num-bigint", - "num-complex", - "num-integer 0.1.41", - "num-iter", - "num-rational 0.2.2", - "num-traits 0.2.10", + "num-bigint 0.2.5 (git+https://github.com/mesalock-linux/num-bigint-sgx)", + "num-complex 0.2.3 (git+https://github.com/mesalock-linux/num-complex-sgx)", + "num-integer 0.1.41 (git+https://github.com/mesalock-linux/num-integer-sgx)", + "num-iter 0.1.39 (git+https://github.com/mesalock-linux/num-iter-sgx)", + "num-rational 0.2.2 (git+https://github.com/mesalock-linux/num-rational-sgx)", + "num-traits 0.2.10 (git+https://github.com/mesalock-linux/num-traits-sgx)", ] [[package]] @@ -314,10 +283,10 @@ name = "num-bigint" version = "0.2.5" source = "git+https://github.com/mesalock-linux/num-bigint-sgx#377ecfb8bfac838418e80af9ed6cc74a627ca9c9" dependencies = [ - "autocfg 1.0.0", - "num-integer 0.1.41", - "num-traits 0.2.10", - "sgx_tstd", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.41 (git+https://github.com/mesalock-linux/num-integer-sgx)", + "num-traits 0.2.10 (git+https://github.com/mesalock-linux/num-traits-sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -325,9 +294,9 @@ name = "num-complex" version = "0.2.3" source = "git+https://github.com/mesalock-linux/num-complex-sgx#44efec7125258a7bc6103942820d30ee7e44adf0" dependencies = [ - "autocfg 0.1.7", - "num-traits 0.2.10", - "sgx_tstd", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.10 (git+https://github.com/mesalock-linux/num-traits-sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -335,19 +304,18 @@ name = "num-integer" version = "0.1.41" source = "git+https://github.com/mesalock-linux/num-integer-sgx#0ece2da7c01233749769a1574f61236d1569b2b9" dependencies = [ - "autocfg 0.1.7", - "num-traits 0.2.10", - "sgx_tstd", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.10 (git+https://github.com/mesalock-linux/num-traits-sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "num-integer" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" dependencies = [ - "autocfg 1.0.0", - "num-traits 0.2.11", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -355,9 +323,9 @@ name = "num-iter" version = "0.1.39" source = "git+https://github.com/mesalock-linux/num-iter-sgx#08168b9a5ba38bfbcc7c9ea70072834ea046bf1e" dependencies = [ - "num-integer 0.1.41", - "num-traits 0.2.10", - "sgx_tstd", + "num-integer 0.1.41 (git+https://github.com/mesalock-linux/num-integer-sgx)", + "num-traits 0.2.10 (git+https://github.com/mesalock-linux/num-traits-sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -365,22 +333,21 @@ name = "num-rational" version = "0.2.2" source = "git+https://github.com/mesalock-linux/num-rational-sgx#7db9ef42a6453b8d400801766b0e0be3229b1765" dependencies = [ - "autocfg 0.1.7", - "num-bigint", - "num-integer 0.1.41", - "num-traits 0.2.10", - "sgx_tstd", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.5 (git+https://github.com/mesalock-linux/num-bigint-sgx)", + "num-integer 0.1.41 (git+https://github.com/mesalock-linux/num-integer-sgx)", + "num-traits 0.2.10 (git+https://github.com/mesalock-linux/num-traits-sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "num-rational" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg 1.0.0", - "num-integer 0.1.42", - "num-traits 0.2.11", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -388,120 +355,107 @@ name = "num-traits" version = "0.2.10" source = "git+https://github.com/mesalock-linux/num-traits-sgx#7551dca0b9f9fb86375bf1a84048d53f72d5ad79" dependencies = [ - "autocfg 0.1.7", - "sgx_tstd", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "num-traits" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "opaque-debug" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "parity-wasm" version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" [[package]] name = "ppv-lite86" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" [[package]] name = "proc-macro2" -version = "1.0.12" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319" dependencies = [ - "unicode-xid", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pwasm-utils" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" dependencies = [ - "byteorder", - "log", - "parity-wasm", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quote" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", - "libc", - "rand_chacha", - "rand_core", - "rand_hc", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_chacha" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "ppv-lite86", - "rand_core", + "ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" [[package]] name = "remove_dir_all" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" dependencies = [ - "winapi", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -509,10 +463,10 @@ name = "ring" version = "0.16.11" source = "git+https://github.com/mesalock-linux/ring-sgx?tag=v0.16.5#5311ddb2d335ddabf7a00f94efd8e7a5f7a9f728" dependencies = [ - "cc", - "sgx_tstd", - "spin", - "untrusted", + "cc 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -520,8 +474,8 @@ name = "rust-base58" version = "0.0.4" source = "git+https://github.com/mesalock-linux/rust-base58-sgx?rev=sgx_1.1.2#38b41f435f96e97142ddd1c1b94df91132a6787e" dependencies = [ - "num", - "sgx_tstd", + "num 0.2.0 (git+https://github.com/mesalock-linux/num-sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -529,45 +483,42 @@ name = "rustls" version = "0.16.0" source = "git+https://github.com/mesalock-linux/rustls?rev=sgx_1.1.2#ce26c885355fde79d45a27a6bbca490d9e8fcc0e" dependencies = [ - "base64", - "ring", - "sct", - "sgx_tstd", - "webpki", + "base64 0.10.1 (git+https://github.com/mesalock-linux/rust-base64-sgx)", + "ring 0.16.11 (git+https://github.com/mesalock-linux/ring-sgx?tag=v0.16.5)", + "sct 0.6.0 (git+https://github.com/mesalock-linux/sct.rs?branch=mesalock_sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "webpki 0.21.2 (git+https://github.com/mesalock-linux/webpki?branch=mesalock_sgx)", ] [[package]] name = "ryu" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" [[package]] name = "sct" version = "0.6.0" source = "git+https://github.com/mesalock-linux/sct.rs?branch=mesalock_sgx#b16fb044362e6722566dbeb171e537c50dcb0501" dependencies = [ - "ring", - "sgx_tstd", - "untrusted", + "ring 0.16.11 (git+https://github.com/mesalock-linux/ring-sgx?tag=v0.16.5)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "secp256k1" version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2932dc07acd2066ff2e3921a4419606b220ba6cd03a9935123856cc534877056" dependencies = [ - "secp256k1-sys", + "secp256k1-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "secp256k1-sys" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab2c26f0d3552a0f12e639ae8a64afc2e3db9c52fe32f5fc6c289d38519f220" dependencies = [ - "cc", + "cc 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -575,27 +526,25 @@ name = "serde" version = "1.0.106" source = "git+https://github.com/mesalock-linux/serde-sgx.git#58ff0793d46f96124132110880d0f4d44050d6ee" dependencies = [ - "sgx_tstd", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "serde" version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c" dependencies = [ - "serde_derive", + "serde_derive 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -604,20 +553,19 @@ version = "1.0.51" source = "git+https://github.com/mesalock-linux/serde-json-sgx#3fe8bd43ff5627f410efba9c67bb3d31f22b3bec" dependencies = [ "itoa 0.4.5 (git+https://github.com/mesalock-linux/itoa-sgx.git)", - "ryu", - "serde 1.0.106", - "sgx_tstd", + "ryu 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.106 (git+https://github.com/mesalock-linux/serde-sgx.git)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "serde_json" version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993948e75b189211a9b31a7528f950c6adc21f9720b6438ff80a7fa2f864cea2" dependencies = [ "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu", - "serde 1.0.110", + "ryu 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -630,9 +578,9 @@ name = "sgx_backtrace_sys" version = "1.1.2" source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" dependencies = [ - "cc", - "sgx_build_helper", - "sgx_libc", + "cc 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", + "sgx_build_helper 0.1.3 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_libc 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -655,7 +603,25 @@ name = "sgx_libc" version = "1.1.2" source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" dependencies = [ - "sgx_types", + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", +] + +[[package]] +name = "sgx_rand" +version = "1.1.2" +source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" +dependencies = [ + "sgx_trts 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", +] + +[[package]] +name = "sgx_tcrypto" +version = "1.1.2" +source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" +dependencies = [ + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -663,8 +629,8 @@ name = "sgx_tprotected_fs" version = "1.1.2" source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" dependencies = [ - "sgx_trts", - "sgx_types", + "sgx_trts 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -672,8 +638,27 @@ name = "sgx_trts" version = "1.1.2" source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" dependencies = [ - "sgx_libc", - "sgx_types", + "sgx_libc 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", +] + +[[package]] +name = "sgx_tse" +version = "1.1.2" +source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" +dependencies = [ + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", +] + +[[package]] +name = "sgx_tseal" +version = "1.1.2" +source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" +dependencies = [ + "sgx_tcrypto 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_trts 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_tse 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -681,15 +666,15 @@ name = "sgx_tstd" version = "1.1.2" source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" dependencies = [ - "hashbrown_tstd", - "sgx_alloc", - "sgx_backtrace_sys", - "sgx_demangle", - "sgx_libc", - "sgx_tprotected_fs", - "sgx_trts", - "sgx_types", - "sgx_unwind", + "hashbrown_tstd 0.7.1 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_alloc 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_backtrace_sys 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_demangle 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_libc 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_tprotected_fs 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_trts 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_unwind 0.1.1 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] @@ -702,174 +687,165 @@ name = "sgx_unwind" version = "0.1.1" source = "git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2#253b3ac982b2d09d32f5fa5a2011e3c36bcbed1e" dependencies = [ - "sgx_build_helper", + "sgx_build_helper 0.1.3 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", ] [[package]] name = "sha2" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" dependencies = [ - "block-buffer", - "digest", - "fake-simd", - "opaque-debug", + "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" -version = "1.0.19" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e5aa70697bb26ee62214ae3288465ecec0000f05182f039b477001f08f5ae7" dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ - "cfg-if", - "libc", - "rand", - "redox_syscall", - "remove_dir_all", - "winapi", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thiserror" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d12a1dae4add0f0d568eebc7bf142f145ba1aa2544cafb195c76f0f409091b60" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thiserror-impl" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f34e0c1caaa462fd840ec6b768946ea1e7842620d94fe29d5b847138f521269" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ - "serde 1.0.110", + "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "typenum" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] name = "unicode-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" [[package]] name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" [[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "vec_map" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasmi" version = "0.6.2" source = "git+https://github.com/paritytech/wasmi?rev=39a18a433a765a36383d34d4edd536ba1e0664d2#39a18a433a765a36383d34d4edd536ba1e0664d2" dependencies = [ - "libm", - "memory_units", - "num-rational 0.2.4", - "num-traits 0.2.11", - "parity-wasm", - "wasmi-validation", + "libm 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi-validation 0.3.0 (git+https://github.com/paritytech/wasmi?rev=39a18a433a765a36383d34d4edd536ba1e0664d2)", ] [[package]] name = "wasmi-runtime" version = "0.1.0" dependencies = [ - "base64", - "bech32", - "bit-vec", - "chrono", - "ctor", - "derive_more", - "enclave-ffi-types", - "httparse", - "itertools", - "lazy_static", - "log", - "num-bigint", - "parity-wasm", - "pwasm-utils", - "ring", - "rust-base58", - "rustls", - "secp256k1", - "serde_json 1.0.51", - "sgx_edl", - "sha2", - "wasmi", - "webpki", - "webpki-roots", - "yasna", + "base64 0.10.1 (git+https://github.com/mesalock-linux/rust-base64-sgx)", + "bech32 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-vec 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.11 (git+https://github.com/mesalock-linux/chrono-sgx)", + "ctor 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.7 (registry+https://github.com/rust-lang/crates.io-index)", + "enclave-ffi-types 0.1.0", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.5 (git+https://github.com/mesalock-linux/num-bigint-sgx)", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.11 (git+https://github.com/mesalock-linux/ring-sgx?tag=v0.16.5)", + "rust-base58 0.0.4 (git+https://github.com/mesalock-linux/rust-base58-sgx?rev=sgx_1.1.2)", + "rustls 0.16.0 (git+https://github.com/mesalock-linux/rustls?rev=sgx_1.1.2)", + "secp256k1 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.51 (git+https://github.com/mesalock-linux/serde-json-sgx)", + "sgx_edl 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_rand 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_tcrypto 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_trts 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_tse 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_tseal 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasmi 0.6.2 (git+https://github.com/paritytech/wasmi?rev=39a18a433a765a36383d34d4edd536ba1e0664d2)", + "webpki 0.21.2 (git+https://github.com/mesalock-linux/webpki?branch=mesalock_sgx)", + "webpki-roots 0.19.0 (git+https://github.com/mesalock-linux/webpki-roots?branch=mesalock_sgx)", + "yasna 0.3.1 (git+https://github.com/mesalock-linux/yasna.rs-sgx?rev=sgx_1.1.2)", ] [[package]] @@ -877,7 +853,7 @@ name = "wasmi-validation" version = "0.3.0" source = "git+https://github.com/paritytech/wasmi?rev=39a18a433a765a36383d34d4edd536ba1e0664d2#39a18a433a765a36383d34d4edd536ba1e0664d2" dependencies = [ - "parity-wasm", + "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -885,9 +861,9 @@ name = "webpki" version = "0.21.2" source = "git+https://github.com/mesalock-linux/webpki?branch=mesalock_sgx#ab35cad4197f6e421ca14da0a2eb7df86654418f" dependencies = [ - "ring", - "sgx_tstd", - "untrusted", + "ring 0.16.11 (git+https://github.com/mesalock-linux/ring-sgx?tag=v0.16.5)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -895,39 +871,145 @@ name = "webpki-roots" version = "0.19.0" source = "git+https://github.com/mesalock-linux/webpki-roots?branch=mesalock_sgx#4b542642de1d5a5394f8a24b356b7801e9220008" dependencies = [ - "sgx_tstd", - "webpki", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", + "webpki 0.21.2 (git+https://github.com/mesalock-linux/webpki?branch=mesalock_sgx)", ] [[package]] name = "winapi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "yasna" version = "0.3.1" source = "git+https://github.com/mesalock-linux/yasna.rs-sgx?rev=sgx_1.1.2#e28d16ecb426975d10ab792179e4d4f473ab872d" dependencies = [ - "bit-vec", - "chrono", - "num-bigint", - "sgx_tstd", -] + "bit-vec 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.11 (git+https://github.com/mesalock-linux/chrono-sgx)", + "num-bigint 0.2.5 (git+https://github.com/mesalock-linux/num-bigint-sgx)", + "sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)", +] + +[metadata] +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum base64 0.10.1 (git+https://github.com/mesalock-linux/rust-base64-sgx)" = "" +"checksum bech32 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cdcf67bb7ba7797a081cd19009948ab533af7c355d5caf1d08c777582d351e9c" +"checksum bit-vec 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +"checksum cbindgen 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2db2df1ebc842c41fd2c4ae5b5a577faf63bd5151b953db752fc686812bee318" +"checksum cc 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "8dae9c4b8fedcae85592ba623c4fd08cfdab3e3b72d6df780c6ead964a69bfff" +"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum chrono 0.4.11 (git+https://github.com/mesalock-linux/chrono-sgx)" = "" +"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" +"checksum ctor 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cf6b25ee9ac1995c54d7adb2eff8cfffb7260bc774fb63c601ec65467f43cd9d" +"checksum derive_more 0.99.7 (registry+https://github.com/rust-lang/crates.io-index)" = "2127768764f1556535c01b5326ef94bd60ff08dcfbdc544d53e69ed155610f5d" +"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +"checksum hashbrown_tstd 0.7.1 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71" +"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +"checksum itoa 0.4.5 (git+https://github.com/mesalock-linux/itoa-sgx.git)" = "" +"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +"checksum libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)" = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" +"checksum libm 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" +"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +"checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" +"checksum num 0.2.0 (git+https://github.com/mesalock-linux/num-sgx)" = "" +"checksum num-bigint 0.2.5 (git+https://github.com/mesalock-linux/num-bigint-sgx)" = "" +"checksum num-complex 0.2.3 (git+https://github.com/mesalock-linux/num-complex-sgx)" = "" +"checksum num-integer 0.1.41 (git+https://github.com/mesalock-linux/num-integer-sgx)" = "" +"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +"checksum num-iter 0.1.39 (git+https://github.com/mesalock-linux/num-iter-sgx)" = "" +"checksum num-rational 0.2.2 (git+https://github.com/mesalock-linux/num-rational-sgx)" = "" +"checksum num-rational 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +"checksum num-traits 0.2.10 (git+https://github.com/mesalock-linux/num-traits-sgx)" = "" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +"checksum parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" +"checksum ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +"checksum proc-macro2 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "1502d12e458c49a4c9cbff560d0fe0060c252bc29799ed94ca2ed4bb665a0101" +"checksum pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" +"checksum quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea" +"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +"checksum ring 0.16.11 (git+https://github.com/mesalock-linux/ring-sgx?tag=v0.16.5)" = "" +"checksum rust-base58 0.0.4 (git+https://github.com/mesalock-linux/rust-base58-sgx?rev=sgx_1.1.2)" = "" +"checksum rustls 0.16.0 (git+https://github.com/mesalock-linux/rustls?rev=sgx_1.1.2)" = "" +"checksum ryu 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" +"checksum sct 0.6.0 (git+https://github.com/mesalock-linux/sct.rs?branch=mesalock_sgx)" = "" +"checksum secp256k1 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2932dc07acd2066ff2e3921a4419606b220ba6cd03a9935123856cc534877056" +"checksum secp256k1-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ab2c26f0d3552a0f12e639ae8a64afc2e3db9c52fe32f5fc6c289d38519f220" +"checksum serde 1.0.106 (git+https://github.com/mesalock-linux/serde-sgx.git)" = "" +"checksum serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)" = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c" +"checksum serde_derive 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)" = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984" +"checksum serde_json 1.0.51 (git+https://github.com/mesalock-linux/serde-json-sgx)" = "" +"checksum serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)" = "993948e75b189211a9b31a7528f950c6adc21f9720b6438ff80a7fa2f864cea2" +"checksum sgx_alloc 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_backtrace_sys 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_build_helper 0.1.3 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_demangle 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_edl 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_libc 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_rand 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_tcrypto 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_tprotected_fs 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_trts 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_tse 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_tseal 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_tstd 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_types 1.1.2 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sgx_unwind 0.1.1 (git+https://github.com/apache/teaclave-sgx-sdk.git?rev=v1.1.2)" = "" +"checksum sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum syn 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f14a640819f79b72a710c0be059dce779f9339ae046c8bef12c361d56702146f" +"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +"checksum thiserror 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "b13f926965ad00595dd129fa12823b04bbf866e9085ab0a5f2b05b850fbfc344" +"checksum thiserror-impl 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "893582086c2f98cde18f906265a65b5030a074b1046c674ae898be6519a7f479" +"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +"checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" +"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +"checksum untrusted 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +"checksum wasmi 0.6.2 (git+https://github.com/paritytech/wasmi?rev=39a18a433a765a36383d34d4edd536ba1e0664d2)" = "" +"checksum wasmi-validation 0.3.0 (git+https://github.com/paritytech/wasmi?rev=39a18a433a765a36383d34d4edd536ba1e0664d2)" = "" +"checksum webpki 0.21.2 (git+https://github.com/mesalock-linux/webpki?branch=mesalock_sgx)" = "" +"checksum webpki-roots 0.19.0 (git+https://github.com/mesalock-linux/webpki-roots?branch=mesalock_sgx)" = "" +"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum yasna 0.3.1 (git+https://github.com/mesalock-linux/yasna.rs-sgx?rev=sgx_1.1.2)" = "" diff --git a/cosmwasm/lib/wasmi-runtime/Cargo.toml b/cosmwasm/lib/wasmi-runtime/Cargo.toml index 577e58e6f..19ce99895 100644 --- a/cosmwasm/lib/wasmi-runtime/Cargo.toml +++ b/cosmwasm/lib/wasmi-runtime/Cargo.toml @@ -16,7 +16,18 @@ SGX_MODE_HW = [] production = [] test = [] +# This annotation is here to trick the IDE into showing us type information about this crate. +# we alwats compile to the "sgx" target, so this will always be false. +# when compiling to the "sgx" target, we pull this from the target root with an "extern crate" directive +[target.'cfg(not(target_env = "sgx"))'.dependencies] +sgx_types = { rev = "v1.1.2", git = "https://github.com/apache/teaclave-sgx-sdk.git" } + [dependencies] +sgx_tse = { rev = "v1.1.2", git = "https://github.com/apache/teaclave-sgx-sdk.git" } +sgx_rand = { rev = "v1.1.2", git = "https://github.com/apache/teaclave-sgx-sdk.git" } +sgx_trts = { rev = "v1.1.2", git = "https://github.com/apache/teaclave-sgx-sdk.git" } +sgx_tseal = { rev = "v1.1.2", git = "https://github.com/apache/teaclave-sgx-sdk.git" } +sgx_tcrypto = { rev = "v1.1.2", git = "https://github.com/apache/teaclave-sgx-sdk.git" } enclave-ffi-types = { path = "../enclave-ffi-types" } pwasm-utils = { version = "0.12.0", default-features = false } parity-wasm = { version = "0.41.0", default-features = false } @@ -68,32 +79,3 @@ features = ["dangerous_configuration", "mesalock_sgx"] [dev-dependencies] sgx_edl = { rev = "v1.1.2", git = "https://github.com/apache/teaclave-sgx-sdk.git" } -# Comment out these following lines to use rust-sgx-sdk from git -# [patch.'https://github.com/apache/teaclave-sgx-sdk.git'] -# sgx_alloc = { path = "../incubator-teaclave-sgx-sdk/sgx_alloc" } -# sgx_backtrace = { path = "../incubator-teaclave-sgx-sdk/sgx_backtrace" } -# sgx_backtrace_sys = { path = "../incubator-teaclave-sgx-sdk/sgx_backtrace_sys" } -# sgx_build_helper = { path = "../incubator-teaclave-sgx-sdk/sgx_build_helper" } -# sgx_cov = { path = "../incubator-teaclave-sgx-sdk/sgx_cov" } -# sgx_crypto_helper = { path = "../incubator-teaclave-sgx-sdk/sgx_crypto_helper" } -# sgx_demangle = { path = "../incubator-teaclave-sgx-sdk/sgx_demangle" } -# sgx_libc = { path = "../incubator-teaclave-sgx-sdk/sgx_libc" } -# sgx_rand = { path = "../incubator-teaclave-sgx-sdk/sgx_rand" } -# sgx_rand_derive = { path = "../incubator-teaclave-sgx-sdk/sgx_rand_derive" } -# sgx_serialize = { path = "../incubator-teaclave-sgx-sdk/sgx_serialize" } -# sgx_serialize_derive = { path = "../incubator-teaclave-sgx-sdk/sgx_serialize_derive" } -# sgx_serialize_derive_internals = { path = "../incubator-teaclave-sgx-sdk/sgx_serialize_derive_internals" } -# sgx_tcrypto = { path = "../incubator-teaclave-sgx-sdk/sgx_tcrypto" } -# sgx_tcrypto_helper = { path = "../incubator-teaclave-sgx-sdk/sgx_tcrypto_helper" } -# sgx_tdh = { path = "../incubator-teaclave-sgx-sdk/sgx_tdh" } -# sgx_tkey_exchange = { path = "../incubator-teaclave-sgx-sdk/sgx_tkey_exchange" } -# sgx_tprotected_fs = { path = "../incubator-teaclave-sgx-sdk/sgx_tprotected_fs" } -# sgx_trts = { path = "../incubator-teaclave-sgx-sdk/sgx_trts" } -# sgx_tse = { path = "../incubator-teaclave-sgx-sdk/sgx_tse" } -# sgx_tseal = { path = "../incubator-teaclave-sgx-sdk/sgx_tseal" } -# sgx_tstd = { path = "../incubator-teaclave-sgx-sdk/sgx_tstd" } -# sgx_tunittest = { path = "../incubator-teaclave-sgx-sdk/sgx_tunittest" } -# sgx_types = { path = "../incubator-teaclave-sgx-sdk/sgx_types" } -# sgx_ucrypto = { path = "../incubator-teaclave-sgx-sdk/sgx_ucrypto" } -# sgx_unwind = { path = "../incubator-teaclave-sgx-sdk/sgx_unwind" } -# sgx_urts = { path = "../incubator-teaclave-sgx-sdk/sgx_urts" } diff --git a/cosmwasm/lib/wasmi-runtime/src/attestation.rs b/cosmwasm/lib/wasmi-runtime/src/attestation.rs index b1b9fe68e..15521c791 100644 --- a/cosmwasm/lib/wasmi-runtime/src/attestation.rs +++ b/cosmwasm/lib/wasmi-runtime/src/attestation.rs @@ -8,7 +8,6 @@ use sgx_tse::*; use sgx_types::*; use std::io::{Read, Write}; use std::net::TcpStream; -use std::prelude::v1::*; use std::ptr; use std::str; @@ -17,8 +16,8 @@ use std::sync::Arc; use std::untrusted::fs; use std::vec::Vec; -use crate::crypto::KeyPair; use crate::consts::{API_KEY_FILE, SPID_FILE}; +use crate::crypto::KeyPair; use crate::hex; use crate::imports::*; @@ -117,7 +116,6 @@ pub fn create_attestation_certificate( kp: &KeyPair, sign_type: sgx_quote_sign_type_t, ) -> Result<(Vec, Vec), sgx_status_t> { - // extract private key from KeyPair let mut priv_key_buf: [u8; 32] = [0u8; 32]; priv_key_buf.copy_from_slice(kp.get_privkey()); @@ -132,7 +130,7 @@ pub fn create_attestation_certificate( // convert keypair private to sgx ecc private let prv_k = sgx_ec256_private_t { - r: priv_key_buf.clone() + r: priv_key_buf.clone(), }; // generate the P256 public (will be different from KeyPair's public key) let pub_k = rsgx_ecc256_pub_from_priv(&prv_k).unwrap(); @@ -227,8 +225,8 @@ pub fn create_attestation_report( report_data.d[..64].copy_from_slice(pub_k); /* This is used to match the encoding of the public key here with the ecc key, but honestly - the certificate uses curve P256, so that will cause issues anyway -- I'm leaving the code here - as a reference in case we want to take another look at this at some point */ + the certificate uses curve P256, so that will cause issues anyway -- I'm leaving the code here + as a reference in case we want to take another look at this at some point */ // let mut pub_k_gx = pub_k.gx.clone(); // pub_k_gx.reverse(); diff --git a/cosmwasm/lib/wasmi-runtime/src/cert.rs b/cosmwasm/lib/wasmi-runtime/src/cert.rs index a747e3676..66f00873e 100644 --- a/cosmwasm/lib/wasmi-runtime/src/cert.rs +++ b/cosmwasm/lib/wasmi-runtime/src/cert.rs @@ -3,35 +3,34 @@ use chrono::prelude::*; use chrono::Duration; use chrono::TimeZone; use chrono::Utc as TzUtc; +use log::*; use num_bigint::BigUint; use rustls; use sgx_tcrypto::*; use sgx_types::*; -use log::*; -use std::{ptr, str}; use std::io::BufReader; +use std::{ptr, str}; -use std::prelude::v1::*; +use itertools::Itertools; use std::time::*; use std::untrusted::time::SystemTimeEx; use yasna::models::ObjectIdentifier; -use itertools::Itertools; use base64; use serde_json; use serde_json::Value; -use super::consts::{SIGNING_METHOD, CERTEXPIRYDAYS, SigningMethod}; - +use super::consts::{SigningMethod, CERTEXPIRYDAYS, SIGNING_METHOD}; extern "C" { - pub fn ocall_get_update_info (ret_val: *mut sgx_status_t, - platformBlob: * const sgx_platform_info_t, - enclaveTrusted: i32, - update_info: * mut sgx_update_info_bit_t) -> sgx_status_t; + pub fn ocall_get_update_info( + ret_val: *mut sgx_status_t, + platformBlob: *const sgx_platform_info_t, + enclaveTrusted: i32, + update_info: *mut sgx_update_info_bit_t, + ) -> sgx_status_t; } - type SignatureAlgorithms = &'static [&'static webpki::SignatureAlgorithm]; static SUPPORTED_SIG_ALGS: SignatureAlgorithms = &[ &webpki::ECDSA_P256_SHA256, @@ -47,18 +46,20 @@ static SUPPORTED_SIG_ALGS: SignatureAlgorithms = &[ &webpki::RSA_PKCS1_3072_8192_SHA384, ]; -pub const IAS_REPORT_CA:&[u8] = include_bytes!("../Intel_SGX_Attestation_RootCA.pem"); +pub const IAS_REPORT_CA: &[u8] = include_bytes!("../Intel_SGX_Attestation_RootCA.pem"); // todo: replace this with MRSIGNER/MRENCLAVE -pub const ENCLAVE_SIGNATURE:&[u8] = include_bytes!("../Intel_SGX_Attestation_RootCA.pem"); +pub const ENCLAVE_SIGNATURE: &[u8] = include_bytes!("../Intel_SGX_Attestation_RootCA.pem"); -const ISSUER : &str = "EnigmaTEE"; -const SUBJECT : &str = "EnigmaChain Node Certificate"; +const ISSUER: &str = "EnigmaTEE"; +const SUBJECT: &str = "EnigmaChain Node Certificate"; -pub fn gen_ecc_cert(payload: String, - prv_k: &sgx_ec256_private_t, - pub_k: &sgx_ec256_public_t, - ecc_handle: &SgxEccHandle) -> Result<(Vec, Vec), sgx_status_t> { +pub fn gen_ecc_cert( + payload: String, + prv_k: &sgx_ec256_private_t, + pub_k: &sgx_ec256_public_t, + ecc_handle: &SgxEccHandle, +) -> Result<(Vec, Vec), sgx_status_t> { // Generate public key bytes since both DER will use it let mut pub_key_bytes: Vec = vec![4]; let mut pk_gx = pub_k.gx.clone(); @@ -73,14 +74,18 @@ pub fn gen_ecc_cert(payload: String, writer.write_sequence(|writer| { writer.next().write_sequence(|writer| { // Certificate Version - writer.next().write_tagged(yasna::Tag::context(0), |writer| { - writer.write_i8(2); - }); + writer + .next() + .write_tagged(yasna::Tag::context(0), |writer| { + writer.write_i8(2); + }); // Certificate Serial Number (unused but required) writer.next().write_u8(1); // Signature Algorithm: ecdsa-with-SHA256 writer.next().write_sequence(|writer| { - writer.next().write_oid(&ObjectIdentifier::from_slice(&[1,2,840,10045,4,3,2])); + writer + .next() + .write_oid(&ObjectIdentifier::from_slice(&[1, 2, 840, 10045, 4, 3, 2])); }); // Issuer: CN=MesaTEE (unused but required) writer.next().write_sequence(|writer| { @@ -88,7 +93,7 @@ pub fn gen_ecc_cert(payload: String, writer.next().write_sequence(|writer| { writer .next() - .write_oid(&ObjectIdentifier::from_slice(&[2,5,4,3])); + .write_oid(&ObjectIdentifier::from_slice(&[2, 5, 4, 3])); writer.next().write_utf8_string(&ISSUER); }); }); @@ -99,14 +104,20 @@ pub fn gen_ecc_cert(payload: String, let expire = now + Duration::days(CERTEXPIRYDAYS).to_std().unwrap(); let expire_ts = TzUtc.timestamp(expire.as_secs() as i64, 0); writer.next().write_sequence(|writer| { - writer.next().write_utctime(&yasna::models::UTCTime::from_datetime(&issue_ts)); - writer.next().write_utctime(&yasna::models::UTCTime::from_datetime(&expire_ts)); + writer + .next() + .write_utctime(&yasna::models::UTCTime::from_datetime(&issue_ts)); + writer + .next() + .write_utctime(&yasna::models::UTCTime::from_datetime(&expire_ts)); }); // Subject: CN=MesaTEE (unused but required) writer.next().write_sequence(|writer| { writer.next().write_set(|writer| { writer.next().write_sequence(|writer| { - writer.next().write_oid(&ObjectIdentifier::from_slice(&[2,5,4,3])); + writer + .next() + .write_oid(&ObjectIdentifier::from_slice(&[2, 5, 4, 3])); writer.next().write_utf8_string(&SUBJECT); }); }); @@ -115,26 +126,38 @@ pub fn gen_ecc_cert(payload: String, // Public Key Algorithm writer.next().write_sequence(|writer| { // id-ecPublicKey - writer.next().write_oid(&ObjectIdentifier::from_slice(&[1,2,840,10045,2,1])); + writer + .next() + .write_oid(&ObjectIdentifier::from_slice(&[1, 2, 840, 10045, 2, 1])); // prime256v1 - writer.next().write_oid(&ObjectIdentifier::from_slice(&[1,2,840,10045,3,1,7])); + writer + .next() + .write_oid(&ObjectIdentifier::from_slice(&[1, 2, 840, 10045, 3, 1, 7])); }); // Public Key - writer.next().write_bitvec(&BitVec::from_bytes(&pub_key_bytes)); + writer + .next() + .write_bitvec(&BitVec::from_bytes(&pub_key_bytes)); }); // Certificate V3 Extension - writer.next().write_tagged(yasna::Tag::context(3), |writer| { - writer.write_sequence(|writer| { - writer.next().write_sequence(|writer| { - writer.next().write_oid(&ObjectIdentifier::from_slice(&[2,16,840,1,113730,1,13])); - writer.next().write_bytes(&payload.into_bytes()); + writer + .next() + .write_tagged(yasna::Tag::context(3), |writer| { + writer.write_sequence(|writer| { + writer.next().write_sequence(|writer| { + writer.next().write_oid(&ObjectIdentifier::from_slice(&[ + 2, 16, 840, 1, 113730, 1, 13, + ])); + writer.next().write_bytes(&payload.into_bytes()); + }); }); }); - }); }); // Signature Algorithm: ecdsa-with-SHA256 writer.next().write_sequence(|writer| { - writer.next().write_oid(&ObjectIdentifier::from_slice(&[1,2,840,10045,4,3,2])); + writer + .next() + .write_oid(&ObjectIdentifier::from_slice(&[1, 2, 840, 10045, 4, 3, 2])); }); // Signature let sig = { @@ -160,8 +183,12 @@ pub fn gen_ecc_cert(payload: String, writer.write_sequence(|writer| { writer.next().write_u8(0); writer.next().write_sequence(|writer| { - writer.next().write_oid(&ObjectIdentifier::from_slice(&[1,2,840,10045,2,1])); - writer.next().write_oid(&ObjectIdentifier::from_slice(&[1,2,840,10045,3,1,7])); + writer + .next() + .write_oid(&ObjectIdentifier::from_slice(&[1, 2, 840, 10045, 2, 1])); + writer + .next() + .write_oid(&ObjectIdentifier::from_slice(&[1, 2, 840, 10045, 3, 1, 7])); }); let inner_key_der = yasna::construct_der(|writer| { writer.write_sequence(|writer| { @@ -169,9 +196,11 @@ pub fn gen_ecc_cert(payload: String, let mut prv_k_r = prv_k.r.clone(); prv_k_r.reverse(); writer.next().write_bytes(&prv_k_r); - writer.next().write_tagged(yasna::Tag::context(1), |writer| { - writer.write_bitvec(&BitVec::from_bytes(&pub_key_bytes)); - }); + writer + .next() + .write_tagged(yasna::Tag::context(1), |writer| { + writer.write_bitvec(&BitVec::from_bytes(&pub_key_bytes)); + }); }); }); writer.next().write_bytes(&inner_key_der); @@ -182,7 +211,7 @@ pub fn gen_ecc_cert(payload: String, } pub fn percent_decode(orig: String) -> String { - let v:Vec<&str> = orig.split("%").collect(); + let v: Vec<&str> = orig.split("%").collect(); let mut ret = String::new(); ret.push_str(v[0]); if v.len() > 1 { @@ -197,57 +226,67 @@ pub fn percent_decode(orig: String) -> String { pub fn get_cert_pubkey(cert_der: &[u8]) -> Vec { // Search for Public Key prime256v1 OID let prime256v1_oid = &[0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07]; - let mut offset = cert_der.windows(prime256v1_oid.len()).position(|window| window == prime256v1_oid).unwrap(); + let mut offset = cert_der + .windows(prime256v1_oid.len()) + .position(|window| window == prime256v1_oid) + .unwrap(); offset += 11; // 10 + TAG (0x03) // Obtain Public Key length let mut len = cert_der[offset] as usize; if len > 0x80 { - len = (cert_der[offset+1] as usize) * 0x100 + (cert_der[offset+2] as usize); + len = (cert_der[offset + 1] as usize) * 0x100 + (cert_der[offset + 2] as usize); offset += 2; } // Obtain Public Key offset += 1; - let pub_k = cert_der[offset+2..offset+len].to_vec(); + let pub_k = cert_der[offset + 2..offset + len].to_vec(); - return pub_k + return pub_k; } pub fn get_netscape_comment(cert_der: &[u8]) -> Vec { // Search for Netscape Comment OID - let ns_cmt_oid = &[0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x42, 0x01, 0x0D]; - let mut offset = cert_der.windows(ns_cmt_oid.len()).position(|window| window == ns_cmt_oid).unwrap(); + let ns_cmt_oid = &[ + 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x42, 0x01, 0x0D, + ]; + let mut offset = cert_der + .windows(ns_cmt_oid.len()) + .position(|window| window == ns_cmt_oid) + .unwrap(); offset += 12; // 11 + TAG (0x04) // Obtain Netscape Comment length let mut len = cert_der[offset] as usize; if len > 0x80 { - len = (cert_der[offset+1] as usize) * 0x100 + (cert_der[offset+2] as usize); + len = (cert_der[offset + 1] as usize) * 0x100 + (cert_der[offset + 2] as usize); offset += 2; } // Obtain Netscape Comment offset += 1; - let payload = cert_der[offset..offset+len].to_vec(); + let payload = cert_der[offset..offset + len].to_vec(); payload } -pub fn get_ias_auth_config() -> (Vec, rustls::RootCertStore){ +pub fn get_ias_auth_config() -> (Vec, rustls::RootCertStore) { // Verify if the signing cert is issued by Intel CA let mut ias_ca_stripped = IAS_REPORT_CA.to_vec(); ias_ca_stripped.retain(|&x| x != 0x0d && x != 0x0a); let head_len = "-----BEGIN CERTIFICATE-----".len(); let tail_len = "-----END CERTIFICATE-----".len(); let full_len = ias_ca_stripped.len(); - let ias_ca_core : &[u8] = &ias_ca_stripped[head_len..full_len - tail_len]; + let ias_ca_core: &[u8] = &ias_ca_stripped[head_len..full_len - tail_len]; let ias_cert_dec = base64::decode_config(ias_ca_core, base64::STANDARD).unwrap(); let mut ca_reader = BufReader::new(&IAS_REPORT_CA[..]); let mut root_store = rustls::RootCertStore::empty(); - root_store.add_pem_file(&mut ca_reader).expect("Failed to add CA"); + root_store + .add_pem_file(&mut ca_reader) + .expect("Failed to add CA"); (ias_cert_dec, root_store) } @@ -261,7 +300,7 @@ pub fn parse_signed_payload(report_payload: &[u8]) -> (&[u8], Vec, Vec) let sig_cert_raw = iter.next().unwrap(); let sig_cert_dec = base64::decode_config(&sig_cert_raw, base64::STANDARD).unwrap(); - return (attn_report_raw, sig, sig_cert_dec) + return (attn_report_raw, sig, sig_cert_dec); } #[cfg(not(feature = "SGX_MODE_HW"))] @@ -300,7 +339,7 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { .map(|cert| cert.to_trust_anchor()) .collect(); - let mut chain:Vec<&[u8]> = Vec::new(); + let mut chain: Vec<&[u8]> = Vec::new(); chain.push(&cert); let now_func = webpki::Time::try_from(SystemTime::now()); @@ -309,24 +348,22 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { SUPPORTED_SIG_ALGS, &webpki::TLSServerTrustAnchors(&trust_anchors), &chain, - now_func.unwrap()) { + now_func.unwrap(), + ) { Ok(_) => info!("Cert is good"), Err(e) => { error!("Cert verification error {:?}", e); return Err(sgx_status_t::SGX_ERROR_UNEXPECTED); - }, + } } // Verify the signature against the signing cert - match sig_cert.verify_signature( - &webpki::RSA_PKCS1_2048_8192_SHA256, - &attn_report_raw, - &sig) { + match sig_cert.verify_signature(&webpki::RSA_PKCS1_2048_8192_SHA256, &attn_report_raw, &sig) { Ok(_) => info!("Signature good"), Err(e) => { error!("Signature verification error {:?}", e); return Err(sgx_status_t::SGX_ERROR_UNEXPECTED); - }, + } } // Verify attestation report @@ -353,18 +390,20 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { let mut buf = Vec::new(); // the TLV Header (4 bytes/8 hexes) should be skipped - let n = (pib.len() - 8)/2; + let n = (pib.len() - 8) / 2; for i in 0..n { - buf.push(u8::from_str_radix(&pib[(i*2+8)..(i*2+10)], 16).unwrap()); + buf.push(u8::from_str_radix(&pib[(i * 2 + 8)..(i * 2 + 10)], 16).unwrap()); } let mut update_info = sgx_update_info_bit_t::default(); - let mut rt : sgx_status_t = sgx_status_t::SGX_ERROR_UNEXPECTED; - let res = unsafe{ - ocall_get_update_info(&mut rt as *mut sgx_status_t, - buf.as_slice().as_ptr() as * const sgx_platform_info_t, - 1, - &mut update_info as * mut sgx_update_info_bit_t) + let mut rt: sgx_status_t = sgx_status_t::SGX_ERROR_UNEXPECTED; + let res = unsafe { + ocall_get_update_info( + &mut rt as *mut sgx_status_t, + buf.as_slice().as_ptr() as *const sgx_platform_info_t, + 1, + &mut update_info as *mut sgx_update_info_bit_t, + ) }; if res != sgx_status_t::SGX_SUCCESS { info!("res={:?}", res); @@ -374,7 +413,7 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { if rt != sgx_status_t::SGX_SUCCESS { info!("rt={:?}", rt); // Borrow of packed field is unsafe in future Rust releases - unsafe{ + unsafe { info!("update_info.pswUpdate: {}", update_info.pswUpdate); info!("update_info.csmeFwUpdate: {}", update_info.csmeFwUpdate); info!("update_info.ucodeUpdate: {}", update_info.ucodeUpdate); @@ -385,12 +424,10 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { info!("Failed to fetch platformInfoBlob from attestation report"); return Err(sgx_status_t::SGX_ERROR_UNEXPECTED); } - } - "SW_HARDENING_NEEDED" | "CONFIGURATION_AND_SW_HARDENING_NEEDED" => { + "SW_HARDENING_NEEDED" | "CONFIGURATION_AND_SW_HARDENING_NEEDED" => { if let Value::String(advisory_ids) = &attn_report["AdvisoryIDs"] { info!("Signing enclave is vulnerable, and must be patched before it can be trusted: {:}", advisory_ids.to_string()) - } else { error!("Failed to parse advisory IDs, but platform was marked as vulnerable"); } @@ -409,16 +446,25 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { let quote = base64::decode("e_raw).unwrap(); info!("Quote = {:?}", quote); // TODO: lack security check here - let sgx_quote: sgx_quote_t = unsafe{ptr::read(quote.as_ptr() as *const _)}; + let sgx_quote: sgx_quote_t = unsafe { ptr::read(quote.as_ptr() as *const _) }; // Borrow of packed field is unsafe in future Rust releases // todo: fix this up, validate more unsafe { info!("sgx quote version = {}", sgx_quote.version); info!("sgx quote signature type = {}", sgx_quote.sign_type); - info!("sgx quote report_data = {:02x}", sgx_quote.report_body.report_data.d.iter().format("")); - info!("sgx quote mr_enclave = {:02x}", sgx_quote.report_body.mr_enclave.m.iter().format("")); - info!("sgx quote mr_signer = {:02x}", sgx_quote.report_body.mr_signer.m.iter().format("")); + info!( + "sgx quote report_data = {:02x}", + sgx_quote.report_body.report_data.d.iter().format("") + ); + info!( + "sgx quote mr_enclave = {:02x}", + sgx_quote.report_body.mr_enclave.m.iter().format("") + ); + info!( + "sgx quote mr_signer = {:02x}", + sgx_quote.report_body.mr_signer.m.iter().format("") + ); } if SIGNING_METHOD == SigningMethod::MRENCLAVE { @@ -426,7 +472,10 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { debug!("Validating using MRENCLAVE"); if sgx_quote.report_body.mr_enclave.m.to_vec().as_slice() != ENCLAVE_SIGNATURE { info!("Sgx MRENCLAVE is different from expected!"); - info!("sgx quote mr_enclave = {:02x}", sgx_quote.report_body.mr_enclave.m.iter().format("")); + info!( + "sgx quote mr_enclave = {:02x}", + sgx_quote.report_body.mr_enclave.m.iter().format("") + ); // return Err(sgx_status_t::SGX_ERROR_UNEXPECTED); } } @@ -436,7 +485,10 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { debug!("Validating using MRSIGNER"); if sgx_quote.report_body.mr_signer.m.to_vec().as_slice() != ENCLAVE_SIGNATURE { info!("Sgx MRSIGNER is different from expected!"); - info!("sgx quote mr_signer = {:02x}", sgx_quote.report_body.mr_signer.m.iter().format("")); + info!( + "sgx quote mr_signer = {:02x}", + sgx_quote.report_body.mr_signer.m.iter().format("") + ); // return Err(sgx_status_t::SGX_ERROR_UNEXPECTED); } } @@ -454,4 +506,3 @@ pub fn verify_ra_cert(cert_der: &[u8]) -> SgxResult> { Ok(pub_k) } - diff --git a/cosmwasm/lib/wasmi-runtime/src/hex.rs b/cosmwasm/lib/wasmi-runtime/src/hex.rs index 0eada91a3..b1efdc26a 100644 --- a/cosmwasm/lib/wasmi-runtime/src/hex.rs +++ b/cosmwasm/lib/wasmi-runtime/src/hex.rs @@ -1,9 +1,7 @@ - // hex encoder and decoder used by rust-protobuf unittests -use std::prelude::v1::*; -use std::char; use sgx_types::*; +use std::char; fn decode_hex_digit(digit: char) -> u8 { match digit { @@ -75,7 +73,7 @@ pub fn encode_hex(bytes: &[u8]) -> String { // taken from https://github.com/apache/incubator-teaclave-sgx-sdk/blob/master/samplecode/mutual-ra/enclave/src/cert.rs // isn't actually hex, but I'm sticking it here anyway pub fn percent_decode(orig: String) -> String { - let v:Vec<&str> = orig.split("%").collect(); + let v: Vec<&str> = orig.split("%").collect(); let mut ret = String::new(); ret.push_str(v[0]); if v.len() > 1 { @@ -112,4 +110,4 @@ mod test { encode_hex(&[0x01, 0xa2, 0x1a, 0xfe]) ); } -} \ No newline at end of file +} diff --git a/cosmwasm/lib/wasmi-runtime/src/imports.rs b/cosmwasm/lib/wasmi-runtime/src/imports.rs index 81abd4e8a..2cdc3d953 100644 --- a/cosmwasm/lib/wasmi-runtime/src/imports.rs +++ b/cosmwasm/lib/wasmi-runtime/src/imports.rs @@ -27,20 +27,23 @@ extern "C" { } extern "C" { - pub fn ocall_sgx_init_quote ( ret_val : *mut sgx_status_t, - ret_ti : *mut sgx_target_info_t, - ret_gid : *mut sgx_epid_group_id_t) -> sgx_status_t; - pub fn ocall_get_ias_socket ( ret_val : *mut sgx_status_t, - ret_fd : *mut i32) -> sgx_status_t; - pub fn ocall_get_quote (ret_val : *mut sgx_status_t, - p_sigrl : *const u8, - sigrl_len : u32, - p_report : *const sgx_report_t, - quote_type : sgx_quote_sign_type_t, - p_spid : *const sgx_spid_t, - p_nonce : *const sgx_quote_nonce_t, - p_qe_report : *mut sgx_report_t, - p_quote : *mut u8, - maxlen : u32, - p_quote_len : *mut u32) -> sgx_status_t; -} \ No newline at end of file + pub fn ocall_sgx_init_quote( + ret_val: *mut sgx_status_t, + ret_ti: *mut sgx_target_info_t, + ret_gid: *mut sgx_epid_group_id_t, + ) -> sgx_status_t; + pub fn ocall_get_ias_socket(ret_val: *mut sgx_status_t, ret_fd: *mut i32) -> sgx_status_t; + pub fn ocall_get_quote( + ret_val: *mut sgx_status_t, + p_sigrl: *const u8, + sigrl_len: u32, + p_report: *const sgx_report_t, + quote_type: sgx_quote_sign_type_t, + p_spid: *const sgx_spid_t, + p_nonce: *const sgx_quote_nonce_t, + p_qe_report: *mut sgx_report_t, + p_quote: *mut u8, + maxlen: u32, + p_quote_len: *mut u32, + ) -> sgx_status_t; +} diff --git a/cosmwasm/lib/wasmi-runtime/src/lib.rs b/cosmwasm/lib/wasmi-runtime/src/lib.rs index c0033c89c..9396d7079 100644 --- a/cosmwasm/lib/wasmi-runtime/src/lib.rs +++ b/cosmwasm/lib/wasmi-runtime/src/lib.rs @@ -1,22 +1,16 @@ -#![crate_type = "staticlib"] -#![cfg_attr(not(target_env = "sgx"), no_std)] -#![cfg_attr(target_env = "sgx", feature(rustc_private))] - -#[cfg(not(target_env = "sgx"))] -#[macro_use] -extern crate sgx_tstd as std; - -extern crate sgx_rand; -extern crate sgx_tcrypto; -extern crate sgx_trts; -extern crate sgx_tse; +// This annotation is here to trick the IDE into ignoring the extern crate, and instead pull in sgx_types from our +// Cargo.toml. By importing sgx_types using `extern crate` but without letting it resolve in Cargo.toml when compiling +// to SGX, we make the compiler pull it in from the target root, which contains the sgx_types listed in Xargo.toml. +// This in turn silences errors about using the same types from two versions of the same crate. +// (go ahead, try to remove this block and change the Cargo.toml import to a normal one) +#[cfg(target_env = "sgx")] extern crate sgx_types; -mod crypto; mod attestation; mod cert; mod consts; mod contract_operations; +mod crypto; mod errors; pub mod exports; mod gas; diff --git a/cosmwasm/lib/wasmi-runtime/src/results.rs b/cosmwasm/lib/wasmi-runtime/src/results.rs index ea97c5f0a..3387fc695 100644 --- a/cosmwasm/lib/wasmi-runtime/src/results.rs +++ b/cosmwasm/lib/wasmi-runtime/src/results.rs @@ -3,7 +3,6 @@ use sgx_types::sgx_status_t; use crate::imports::ocall_allocate; - /// This struct is returned from module initialization. pub struct InitSuccess { /// The output of the calculation diff --git a/cosmwasm/lib/wasmi-runtime/src/utils.rs b/cosmwasm/lib/wasmi-runtime/src/utils.rs index 220eaef50..6d263854e 100644 --- a/cosmwasm/lib/wasmi-runtime/src/utils.rs +++ b/cosmwasm/lib/wasmi-runtime/src/utils.rs @@ -11,11 +11,11 @@ limitations under the License. */ -use sgx_types::*; use log::*; use sgx_trts::trts::{ - rsgx_lfence, rsgx_raw_is_outside_enclave, rsgx_sfence, rsgx_slice_is_outside_enclave + rsgx_lfence, rsgx_raw_is_outside_enclave, rsgx_sfence, rsgx_slice_is_outside_enclave, }; +use sgx_types::*; pub trait UnwrapOrSgxErrorUnexpected { type ReturnType; @@ -42,6 +42,7 @@ impl UnwrapOrSgxErrorUnexpected for Result { } } } + pub fn validate_mut_ptr(ptr: *mut u8, ptr_len: usize) -> SgxResult<()> { if rsgx_raw_is_outside_enclave(ptr, ptr_len) { error!("Tried to access memory outside enclave -- rsgx_slice_is_outside_enclave"); diff --git a/rust-toolchain b/rust-toolchain index 6b118ecbc..4e74872ff 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-04-07 \ No newline at end of file +nightly-2020-04-07