From 5aba3fbfbcf55adf35a33e76b08f6ed50e843929 Mon Sep 17 00:00:00 2001 From: ptrus Date: Fri, 8 Dec 2023 22:18:00 +0100 Subject: [PATCH] attesttion-tool: DCAP support --- attestation-tool/.cargo/config | 7 + attestation-tool/Cargo.lock | 2560 ++++++++++++++++++++++++++++---- attestation-tool/Cargo.toml | 29 +- attestation-tool/README.md | 53 +- attestation-tool/src/ecdsa.rs | 369 +++++ attestation-tool/src/main.rs | 45 +- 6 files changed, 2772 insertions(+), 291 deletions(-) create mode 100644 attestation-tool/.cargo/config create mode 100644 attestation-tool/src/ecdsa.rs diff --git a/attestation-tool/.cargo/config b/attestation-tool/.cargo/config new file mode 100644 index 0000000..bbd7043 --- /dev/null +++ b/attestation-tool/.cargo/config @@ -0,0 +1,7 @@ +[build] +rustflags = ["-C", "target-feature=+aes,+ssse3"] +rustdocflags = ["-C", "target-feature=+aes,+ssse3"] + +[test] +rustflags = ["-C", "target-feature=+aes,+ssse3"] +rustdocflags = ["-C", "target-feature=+aes,+ssse3"] diff --git a/attestation-tool/Cargo.lock b/attestation-tool/Cargo.lock index 499a19b..6380f40 100644 --- a/attestation-tool/Cargo.lock +++ b/attestation-tool/Cargo.lock @@ -17,6 +17,41 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if 1.0.0", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + [[package]] name = "aesm-client" version = "0.5.4" @@ -36,6 +71,18 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "0.7.19" @@ -63,22 +110,104 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "anyhow" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom 7.1.3", + "num-traits", + "rusticata-macros", + "thiserror", + "time 0.3.30", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", +] + +[[package]] +name = "async-trait" +version = "0.1.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", +] + [[package]] name = "attestation-tool" version = "0.2.0" dependencies = [ "aesm-client", - "base64", + "anyhow", + "base64 0.13.1", + "byteorder", "clap", + "dcap-ql", "env_logger 0.9.3", + "hex", "ias", "lazy_static", + "mbedtls", + "oasis-core-runtime", "pkix", "report-test", + "rustc-hex", + "serde", + "serde_json", "sgx-isa", "sgxs", "sgxs-loaders", - "tokio 1.21.2", + "tokio 1.35.0", + "ureq", + "yasna 0.5.2", ] [[package]] @@ -114,7 +243,7 @@ dependencies = [ "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide", + "miniz_oxide 0.5.4", "object", "rustc-demangle", ] @@ -125,6 +254,43 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64-serde" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e964e3e0a930303c7c0bdb28ebf691dd98d9eee4b8b68019d2c995710b58a18" +dependencies = [ + "base64 0.13.1", + "serde", +] + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bindgen" version = "0.58.1" @@ -140,8 +306,8 @@ dependencies = [ "lazycell", "log", "peeking_take_while", - "proc-macro2", - "quote", + "proc-macro2 1.0.70", + "quote 1.0.33", "regex", "rustc-hash", "shlex", @@ -166,6 +332,33 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "bumpalo" version = "3.11.1" @@ -199,12 +392,18 @@ name = "bytes" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +dependencies = [ + "serde", +] [[package]] name = "cc" -version = "1.0.76" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a284da2e6fe2092f2353e51713435363112dfd60030e22add80be333fb928f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cexpr" @@ -212,7 +411,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" dependencies = [ - "nom", + "nom 5.1.2", ] [[package]] @@ -227,6 +426,30 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if 1.0.0", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + [[package]] name = "chrono" version = "0.4.22" @@ -237,11 +460,22 @@ dependencies = [ "js-sys", "num-integer", "num-traits", - "time", + "time 0.1.44", "wasm-bindgen", "winapi 0.3.9", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + [[package]] name = "clang-sys" version = "1.4.0" @@ -262,7 +496,7 @@ dependencies = [ "ansi_term", "atty", "bitflags", - "strsim", + "strsim 0.8.0", "textwrap", "unicode-width", "vec_map", @@ -287,6 +521,23 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "const-oid" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" + +[[package]] +name = "contracts" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1d1429e3bd78171c65aa010eabcdf8f863ba3254728dbfb0ad4b1545beac15c" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", +] + [[package]] name = "core-foundation" version = "0.9.3" @@ -303,6 +554,24 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "crossbeam" version = "0.7.3" @@ -310,11 +579,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" dependencies = [ "cfg-if 0.1.10", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", + "crossbeam-channel 0.4.4", + "crossbeam-deque 0.7.4", + "crossbeam-epoch 0.8.2", + "crossbeam-queue 0.2.3", + "crossbeam-utils 0.7.2", +] + +[[package]] +name = "crossbeam" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-channel 0.5.8", + "crossbeam-deque 0.8.3", + "crossbeam-epoch 0.9.15", + "crossbeam-queue 0.3.8", + "crossbeam-utils 0.8.16", ] [[package]] @@ -323,21 +606,42 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.7.2", "maybe-uninit", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils 0.8.16", +] + [[package]] name = "crossbeam-deque" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", + "crossbeam-epoch 0.8.2", + "crossbeam-utils 0.7.2", "maybe-uninit", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-epoch 0.9.15", + "crossbeam-utils 0.8.16", +] + [[package]] name = "crossbeam-epoch" version = "0.8.2" @@ -346,10 +650,23 @@ checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ "autocfg", "cfg-if 0.1.10", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", - "memoffset", + "memoffset 0.5.6", + "scopeguard", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if 1.0.0", + "crossbeam-utils 0.8.16", + "memoffset 0.9.0", "scopeguard", ] @@ -360,10 +677,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" dependencies = [ "cfg-if 0.1.10", - "crossbeam-utils", + "crossbeam-utils 0.7.2", "maybe-uninit", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +dependencies = [ + "cfg-if 1.0.0", + "crossbeam-utils 0.8.16", +] + [[package]] name = "crossbeam-utils" version = "0.7.2" @@ -375,6 +702,82 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core", + "subtle-ng", + "zeroize", +] + [[package]] name = "cxx" version = "1.0.81" @@ -396,10 +799,10 @@ dependencies = [ "cc", "codespan-reporting", "once_cell", - "proc-macro2", - "quote", + "proc-macro2 1.0.70", + "quote 1.0.33", "scratch", - "syn", + "syn 1.0.103", ] [[package]] @@ -414,43 +817,262 @@ version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b846f081361125bfc8dc9d3940c84e1fd83ba54bbca7b17cd29483c828be0704" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", ] [[package]] -name = "either" -version = "1.8.0" +name = "darling" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core", + "darling_macro", +] [[package]] -name = "enclave-runner" -version = "0.5.1" +name = "darling_core" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c898a69d405bf41b25111a95a71691dcc3db7e47a8ec38bb780292f2cf859017" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ - "crossbeam", - "failure", - "failure_derive", "fnv", - "fortanix-sgx-abi", - "futures 0.3.25", - "ipc-queue", - "lazy_static", - "libc", - "nix 0.13.1", - "num_cpus", - "openssl", - "sgx-isa", - "sgxs", - "tokio 0.2.25", + "ident_case", + "proc-macro2 1.0.70", + "quote 1.0.33", + "strsim 0.10.0", + "syn 1.0.103", ] [[package]] -name = "encoding_rs" -version = "0.8.31" +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core", + "quote 1.0.33", + "syn 1.0.103", +] + +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + +[[package]] +name = "dcap-ql" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a63d5f9b6526bb82ba697e303d9789a87849753815c84346444e94a5be2de43" +dependencies = [ + "byteorder", + "dcap-ql-sys", + "failure", + "lazy_static", + "libc", + "mbedtls", + "num", + "num-derive 0.2.5", + "num-traits", + "sgx-isa", + "sgxs-loaders", + "yasna 0.3.2", +] + +[[package]] +name = "dcap-ql-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552b23ae3e1283c1baa6711ddf9a6049e2e01d278c2e37ed77229a7f5b56fb4e" +dependencies = [ + "num-derive 0.2.5", + "num-traits", + "sgx-isa", +] + +[[package]] +name = "deoxysii" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fab9d9a7e9ff7a4762c5c378deb4158d6aaeaeab86952ecf64221159dcd20809" +dependencies = [ + "subtle", + "thiserror", + "zeroize", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom 7.1.3", + "num-bigint 0.4.4", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature 1.6.4", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature 2.2.0", +] + +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +dependencies = [ + "curve25519-dalek", + "ed25519 2.2.3", + "rand_core", + "serde", + "sha2 0.10.8", + "signature 2.2.0", + "subtle", + "zeroize", +] + +[[package]] +name = "either" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" + +[[package]] +name = "enclave-runner" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c898a69d405bf41b25111a95a71691dcc3db7e47a8ec38bb780292f2cf859017" +dependencies = [ + "crossbeam 0.7.3", + "failure", + "failure_derive", + "fnv", + "fortanix-sgx-abi", + "futures 0.3.25", + "ipc-queue", + "lazy_static", + "libc", + "nix 0.13.1", + "num_cpus", + "openssl", + "sgx-isa", + "sgxs", + "tokio 0.2.25", +] + +[[package]] +name = "encoding_rs" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ @@ -483,6 +1105,22 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "eyre" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bbb8258be8305fb0237d7b295f47bb24ff1b136a535f473baf40e70468515aa" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "failure" version = "0.1.8" @@ -499,9 +1137,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", "synstructure", ] @@ -514,6 +1152,32 @@ dependencies = [ "instant", ] +[[package]] +name = "fiat-crypto" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" + +[[package]] +name = "flate2" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +dependencies = [ + "crc32fast", + "miniz_oxide 0.7.1", +] + +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "eyre", + "paste", +] + [[package]] name = "fnv" version = "1.0.7" @@ -626,9 +1290,9 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", ] [[package]] @@ -657,12 +1321,45 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "pin-utils", "slab", "tokio-io", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if 1.0.0", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "gimli" version = "0.26.2" @@ -687,19 +1384,40 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.1", "slab", - "tokio 1.21.2", + "tokio 1.35.0", "tokio-util", "tracing", ] +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -715,6 +1433,27 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "honggfuzz" +version = "0.5.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e" +dependencies = [ + "arbitrary", + "lazy_static", + "memmap2", + "rustc_version", +] + [[package]] name = "http" version = "0.2.8" @@ -734,7 +1473,7 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes 1.2.1", "http", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", ] [[package]] @@ -771,9 +1510,9 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.9", - "socket2", - "tokio 1.21.2", + "pin-project-lite 0.2.13", + "socket2 0.4.7", + "tokio 1.35.0", "tower-service", "tracing", "want", @@ -788,7 +1527,7 @@ dependencies = [ "bytes 1.2.1", "hyper", "native-tls", - "tokio 1.21.2", + "tokio 1.35.0", "tokio-native-tls", ] @@ -822,7 +1561,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52ecb007495a0d8d985203c6e29fba32fc64842020ee191a0c33ef2ac4c6ebb2" dependencies = [ - "base64", + "base64 0.13.1", "bitflags", "byteorder", "log", @@ -839,6 +1578,12 @@ dependencies = [ "url", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.3.0" @@ -849,6 +1594,23 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "1.9.1" @@ -856,7 +1618,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", ] [[package]] @@ -868,6 +1649,15 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "intrusive-collections" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b694dc9f70c3bda874626d2aed13b780f137aab435f4e9814121955cf706122e" +dependencies = [ + "memoffset 0.9.0", +] + [[package]] name = "iovec" version = "0.1.4" @@ -892,6 +1682,15 @@ version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.4" @@ -922,6 +1721,9 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] [[package]] name = "lazycell" @@ -931,9 +1733,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -955,6 +1757,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "link-cplusplus" version = "1.0.7" @@ -964,6 +1772,16 @@ dependencies = [ "cc", ] +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.17" @@ -974,7 +1792,16 @@ dependencies = [ ] [[package]] -name = "maybe-uninit" +name = "lru" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +dependencies = [ + "hashbrown 0.13.2", +] + +[[package]] +name = "maybe-uninit" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" @@ -1009,8 +1836,8 @@ dependencies = [ "cmake", "lazy_static", "libc", - "quote", - "syn", + "quote 1.0.33", + "syn 1.0.103", ] [[package]] @@ -1019,6 +1846,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.5.6" @@ -1028,12 +1864,27 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.5.4" @@ -1043,6 +1894,15 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" version = "0.6.23" @@ -1064,14 +1924,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -1183,6 +2042,30 @@ dependencies = [ "version_check", ] +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.2.6" @@ -1194,6 +2077,66 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -1204,13 +2147,37 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -1223,6 +2190,98 @@ dependencies = [ "libc", ] +[[package]] +name = "oasis-cbor" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "937dd928dca340f29f67f096760ccec7853e60ebc156175aadfc8eb203eed37d" +dependencies = [ + "impl-trait-for-tuples", + "oasis-cbor-derive", + "oasis-cbor-value", + "serde", + "thiserror", +] + +[[package]] +name = "oasis-cbor-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b593c6ebad6e6429a8d1dac3509555da30311f0e6fdf93b96475bce895abef6d" +dependencies = [ + "darling", + "oasis-cbor-value", + "proc-macro-crate", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", +] + +[[package]] +name = "oasis-cbor-value" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fe0d7f5a7c55eba7e8e845046c6c81332f4fa4997f0ed497b9f44db1d7f2050" + +[[package]] +name = "oasis-core-runtime" +version = "0.0.0" +source = "git+https://github.com/oasisprotocol/oasis-core?tag=v23.0.9#689ebb41d2fc781b5369a882809f62df61028ec4" +dependencies = [ + "anyhow", + "arbitrary", + "async-trait", + "base64 0.13.1", + "base64-serde", + "bech32", + "bincode", + "byteorder", + "chrono", + "crossbeam 0.8.2", + "curve25519-dalek", + "dcap-ql", + "deoxysii", + "ed25519-dalek", + "futures 0.3.25", + "hmac", + "honggfuzz", + "impl-trait-for-tuples", + "intrusive-collections", + "lazy_static", + "log", + "lru", + "mbedtls", + "num-bigint 0.4.4", + "num-traits", + "oasis-cbor", + "oid-registry", + "percent-encoding", + "rand", + "rsa", + "rustc-hex", + "serde", + "serde_json", + "sgx-isa", + "sha2 0.10.8", + "slog", + "slog-json", + "slog-scope", + "slog-stdlog", + "snow", + "sp800-185", + "tendermint", + "tendermint-light-client", + "tendermint-proto", + "tendermint-rpc", + "thiserror", + "tiny-keccak 2.0.2", + "tokio 1.35.0", + "x25519-dalek", + "x509-parser", + "yasna 0.5.2", + "zeroize", +] + [[package]] name = "object" version = "0.29.0" @@ -1232,11 +2291,26 @@ dependencies = [ "memchr", ] +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + [[package]] name = "once_cell" -version = "1.16.0" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" @@ -1259,9 +2333,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", ] [[package]] @@ -1283,18 +2357,103 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.4.1", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + [[package]] name = "peeking_take_while" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" +[[package]] +name = "peg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a" +dependencies = [ + "peg-macros", + "peg-runtime", +] + +[[package]] +name = "peg-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" +dependencies = [ + "peg-runtime", + "proc-macro2 1.0.70", + "quote 1.0.33", +] + +[[package]] +name = "peg-runtime" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", +] + [[package]] name = "pin-project-lite" version = "0.1.12" @@ -1303,9 +2462,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1313,6 +2472,27 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.26" @@ -1329,20 +2509,112 @@ dependencies = [ "bit-vec 0.6.3", "chrono", "lazy_static", - "num-bigint", + "num-bigint 0.2.6", "num-integer", "yasna 0.3.2", ] +[[package]] +name = "platforms" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes 1.2.1", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", +] + [[package]] name = "protobuf" version = "2.28.0" @@ -1388,18 +2660,66 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.21" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" dependencies = [ - "proc-macro2", + "proc-macro2 0.4.30", ] [[package]] -name = "redox_syscall" -version = "0.2.16" +name = "quote" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2 1.0.70", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags", ] @@ -1448,7 +2768,7 @@ version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" dependencies = [ - "base64", + "base64 0.13.1", "bytes 1.2.1", "encoding_rs", "futures-core", @@ -1465,11 +2785,11 @@ dependencies = [ "native-tls", "once_cell", "percent-encoding", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "serde", "serde_json", "serde_urlencoded", - "tokio 1.21.2", + "tokio 1.35.0", "tokio-native-tls", "tower-service", "url", @@ -1479,6 +2799,20 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted", + "windows-sys 0.48.0", +] + [[package]] name = "rs-libc" version = "0.2.3" @@ -1488,6 +2822,26 @@ dependencies = [ "cc", ] +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature 2.2.0", + "spki", + "subtle", + "zeroize", +] + [[package]] name = "rustc-demangle" version = "0.1.21" @@ -1500,12 +2854,67 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom 7.1.3", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.20" @@ -1528,6 +2937,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "security-framework" version = "2.7.0" @@ -1551,11 +2970,17 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + [[package]] name = "serde" -version = "1.0.147" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -1566,212 +2991,619 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eb83481bce328081ced4404f986de002bf2e08865bec386734595ebf3b2c425" dependencies = [ - "base64", + "base64 0.13.1", "hex", "serde", ] [[package]] -name = "serde_bytes" -version = "0.11.7" +name = "serde_bytes" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", +] + +[[package]] +name = "serde_json" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sgx-isa" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f56e039650326c0a88890fc86369fdaa488f38eb507f3a7b5d80353dc8f0df" +dependencies = [ + "bitflags", +] + +[[package]] +name = "sgx_pkix" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f97d389104915df9b439c0955a6f9d459ba8ce3d735bd32bfd8018655d97cd6" +dependencies = [ + "byteorder", + "lazy_static", + "pkix", + "quick-error", + "sgx-isa", +] + +[[package]] +name = "sgxs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27c45c8d740bf5e4fc57bc9c8b655b1a965664773c6ad1a3bfcf2a037dc9fa2c" +dependencies = [ + "byteorder", + "failure", + "failure_derive", + "foreign-types", + "openssl", + "openssl-sys", + "sgx-isa", + "time 0.1.44", +] + +[[package]] +name = "sgxs-loaders" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f942b8d5bd44dbcb53e5b7851859d50fde7e986eb9b2988994955dae1eae221b" +dependencies = [ + "bitflags", + "failure", + "failure_derive", + "libloading 0.5.2", + "nix 0.15.0", + "sgx-isa", + "sgxs", + "winapi 0.3.9", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "shlex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" + +[[package]] +name = "signal-hook-registry" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "slog" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" + +[[package]] +name = "slog-json" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1e53f61af1e3c8b852eef0a9dee29008f55d6dd63794f3f12cef786cf0f219" +dependencies = [ + "serde", + "serde_json", + "slog", + "time 0.3.30", +] + +[[package]] +name = "slog-scope" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f95a4b4c3274cd2869549da82b57ccc930859bdbf5bcea0424bc5f140b3c786" +dependencies = [ + "arc-swap", + "lazy_static", + "slog", +] + +[[package]] +name = "slog-stdlog" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6706b2ace5bbae7291d3f8d2473e2bfab073ccd7d03670946197aec98471fa3e" +dependencies = [ + "log", + "slog", + "slog-scope", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "snow" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" +dependencies = [ + "aes-gcm", + "blake2", + "chacha20poly1305", + "curve25519-dalek", + "rand_core", + "rustc_version", + "sha2 0.10.8", + "subtle", +] + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "sp800-185" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b18e3b1ddbf090b195425aca6edf8efb8e9b1fd42708131adf0f882db24fc9" +dependencies = [ + "byteorder", + "tiny-keccak 1.5.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13fa70a4ee923979ffb522cacce59d34421ebdea5625e1073c4326ef9d2dd42e" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", + "unicode-xid 0.2.4", +] + +[[package]] +name = "tempfile" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +dependencies = [ + "cfg-if 1.0.0", + "fastrand", + "libc", + "redox_syscall 0.2.16", + "remove_dir_all", + "winapi 0.3.9", +] + +[[package]] +name = "tendermint" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +checksum = "b90c3c1e32352551f0f1639ce765e4c66ce250c733d4b9ba1aff81130437465c" dependencies = [ + "bytes 1.2.1", + "digest 0.10.7", + "ed25519 1.5.3", + "ed25519-consensus", + "flex-error", + "futures 0.3.25", + "num-traits", + "once_cell", + "prost", + "prost-types", "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.8", + "signature 1.6.4", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time 0.3.30", + "zeroize", ] [[package]] -name = "serde_derive" -version = "1.0.147" +name = "tendermint-config" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "74efd33bcb53413b77cbe90ccb2cf0403930a5c1f300725deb87a61f7c4fab90" dependencies = [ - "proc-macro2", - "quote", - "syn", + "flex-error", + "serde", + "serde_json", + "tendermint", + "toml", + "url", ] [[package]] -name = "serde_json" -version = "1.0.87" +name = "tendermint-light-client" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "ac7f5273471fbeaad69e196146dd459f3857c021141a67287aedd0504429e4f0" dependencies = [ - "itoa", - "ryu", + "contracts", + "crossbeam-channel 0.4.4", + "derive_more", + "flex-error", + "futures 0.3.25", "serde", + "serde_cbor", + "serde_derive", + "static_assertions", + "tendermint", + "tendermint-light-client-verifier", + "tendermint-rpc", + "time 0.3.30", ] [[package]] -name = "serde_urlencoded" -version = "0.7.1" +name = "tendermint-light-client-verifier" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +checksum = "f36e9193521a81e4c824faedc5eb31926f8918ebb21a1fa9cee9b3dbe5164a93" dependencies = [ - "form_urlencoded", - "itoa", - "ryu", + "derive_more", + "flex-error", "serde", + "tendermint", + "time 0.3.30", ] [[package]] -name = "sgx-isa" -version = "0.4.0" +name = "tendermint-proto" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f56e039650326c0a88890fc86369fdaa488f38eb507f3a7b5d80353dc8f0df" +checksum = "e553ed65874c3f35a71eb60d255edfea956274b5af37a0297d54bba039fe45e3" dependencies = [ - "bitflags", + "bytes 1.2.1", + "flex-error", + "num-derive 0.3.3", + "num-traits", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time 0.3.30", ] [[package]] -name = "sgx_pkix" -version = "0.1.2" +name = "tendermint-rpc" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f97d389104915df9b439c0955a6f9d459ba8ce3d735bd32bfd8018655d97cd6" +checksum = "d79bd426571d6a805be5c0b6749707ede6c6ee5e55dd45baef46857a1baa9f54" dependencies = [ - "byteorder", - "lazy_static", - "pkix", - "quick-error", - "sgx-isa", + "bytes 1.2.1", + "flex-error", + "getrandom", + "peg", + "pin-project", + "serde", + "serde_bytes", + "serde_json", + "subtle", + "subtle-encoding", + "tendermint", + "tendermint-config", + "thiserror", + "time 0.3.30", + "url", + "uuid", + "walkdir", ] [[package]] -name = "sgxs" -version = "0.7.3" +name = "termcolor" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c45c8d740bf5e4fc57bc9c8b655b1a965664773c6ad1a3bfcf2a037dc9fa2c" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ - "byteorder", - "failure", - "failure_derive", - "foreign-types", - "openssl", - "openssl-sys", - "sgx-isa", - "time", + "winapi-util", ] [[package]] -name = "sgxs-loaders" -version = "0.3.3" +name = "textwrap" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f942b8d5bd44dbcb53e5b7851859d50fde7e986eb9b2988994955dae1eae221b" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "bitflags", - "failure", - "failure_derive", - "libloading 0.5.2", - "nix 0.15.0", - "sgx-isa", - "sgxs", - "winapi 0.3.9", + "unicode-width", ] [[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - -[[package]] -name = "signal-hook-registry" -version = "1.4.0" +name = "thiserror" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ - "libc", + "thiserror-impl", ] [[package]] -name = "slab" -version = "0.4.7" +name = "thiserror-impl" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ - "autocfg", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", ] [[package]] -name = "socket2" -version = "0.4.7" +name = "time" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] [[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.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.12.6" +name = "time" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", ] [[package]] -name = "tempfile" -version = "3.3.0" +name = "time-core" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" -dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.9", -] +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] -name = "termcolor" -version = "1.1.3" +name = "time-macros" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ - "winapi-util", + "time-core", ] [[package]] -name = "textwrap" -version = "0.11.0" +name = "tiny-keccak" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" dependencies = [ - "unicode-width", + "crunchy", ] [[package]] -name = "time" -version = "0.1.44" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "crunchy", ] [[package]] @@ -1815,19 +3647,21 @@ dependencies = [ [[package]] name = "tokio" -version = "1.21.2" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" dependencies = [ - "autocfg", + "backtrace", "bytes 1.2.1", "libc", - "memchr", - "mio 0.8.5", - "pin-project-lite 0.2.9", - "socket2", - "tokio-macros 1.8.0", - "winapi 0.3.9", + "mio 0.8.10", + "num_cpus", + "parking_lot", + "pin-project-lite 0.2.13", + "signal-hook-registry", + "socket2 0.5.5", + "tokio-macros 2.2.0", + "windows-sys 0.48.0", ] [[package]] @@ -1847,20 +3681,20 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", ] [[package]] name = "tokio-macros" -version = "1.8.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", ] [[package]] @@ -1870,7 +3704,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ "native-tls", - "tokio 1.21.2", + "tokio 1.35.0", ] [[package]] @@ -1882,11 +3716,37 @@ dependencies = [ "bytes 1.2.1", "futures-core", "futures-sink", - "pin-project-lite 0.2.9", - "tokio 1.21.2", + "pin-project-lite 0.2.13", + "tokio 1.35.0", "tracing", ] +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tower-service" version = "0.3.2" @@ -1900,7 +3760,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.13", "tracing-core", ] @@ -1919,6 +3779,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + [[package]] name = "unicode-bidi" version = "0.3.8" @@ -1946,12 +3812,28 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + [[package]] name = "unicode-xid" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + [[package]] name = "unix_socket2" version = "0.5.4" @@ -1961,6 +3843,28 @@ dependencies = [ "libc", ] +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" +dependencies = [ + "base64 0.21.5", + "flate2", + "log", + "once_cell", + "rustls", + "rustls-webpki", + "url", + "webpki-roots", +] + [[package]] name = "url" version = "2.3.1" @@ -1972,6 +3876,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" + [[package]] name = "vcpkg" version = "0.2.15" @@ -1996,6 +3906,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.0" @@ -2037,9 +3957,9 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", "wasm-bindgen-shared", ] @@ -2061,7 +3981,7 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ - "quote", + "quote 1.0.33", "wasm-bindgen-macro-support", ] @@ -2071,9 +3991,9 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 1.0.103", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2094,6 +4014,12 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + [[package]] name = "which" version = "3.1.1" @@ -2172,24 +4098,33 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc 0.48.5", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -2199,9 +4134,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -2211,9 +4146,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -2223,9 +4158,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -2235,15 +4170,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -2253,9 +4188,18 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "winnow" +version = "0.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "b67b5f0a4e7a27a64c651977932b9dc5667ca7fc31ac44b03ed37a0cf42fdfff" +dependencies = [ + "memchr", +] [[package]] name = "winreg" @@ -2276,6 +4220,35 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "x25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +dependencies = [ + "curve25519-dalek", + "rand_core", + "serde", + "zeroize", +] + +[[package]] +name = "x509-parser" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom 7.1.3", + "oid-registry", + "rusticata-macros", + "thiserror", + "time 0.3.30", +] + [[package]] name = "yasna" version = "0.2.2" @@ -2283,7 +4256,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79af3189e6b0484c9fd54208f8eeb8818cadee00ec81438b67a64c8e6f2f3694" dependencies = [ "bit-vec 0.5.1", - "num-bigint", + "num-bigint 0.2.6", ] [[package]] @@ -2293,5 +4266,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de7bff972b4f2a06c85f6d8454b09df153af7e3a4ec2aac81db1b105b684ddb" dependencies = [ "bit-vec 0.6.3", - "num-bigint", + "num-bigint 0.2.6", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "num-bigint 0.4.4", +] + +[[package]] +name = "zerocopy" +version = "0.7.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2 1.0.70", + "quote 1.0.33", + "syn 2.0.40", ] diff --git a/attestation-tool/Cargo.toml b/attestation-tool/Cargo.toml index 790a6f2..1c51fe3 100644 --- a/attestation-tool/Cargo.toml +++ b/attestation-tool/Cargo.toml @@ -6,16 +6,31 @@ license = "MPL-2.0" edition = "2018" [dependencies] -ias = { version = "0.1.0", features = ["client", "mbedtls"] } +# Oasis-core deps. +oasis-core-runtime = { git = "https://github.com/oasisprotocol/oasis-core", tag = "v23.0.9" } + +# Fortanix deps. aesm-client = { version = "0.5", features = ["sgxs"] } -sgxs = { version = "0.7" } -sgxs-loaders = { version = "0.3" } +dcap-ql = { version = "0.3.0", features = ["verify"] } +ias = { version = "0.1.0", features = ["client", "mbedtls"] } report-test = { version = "0.3" } sgx-isa = { version = "0.4" } +sgxs = { version = "0.7" } +sgxs-loaders = { version = "0.3" } -clap = "2.23.3" -pkix = "0.1" -lazy_static = "1" -tokio = { version = "1", features = ["macros"] } +# Others. +anyhow = "1.0" base64 = { version = "0.13" } +byteorder = "1.4.3" +clap = "2.23.3" env_logger = "0.9.0" +hex = "0.4" +lazy_static = "1" +mbedtls = "0.8.1" +pkix = "0.1" +rustc-hex = "2.1.0" +serde = { version = "1.0.144", features = ["derive"] } +serde_json = { version = "1.0.87", features = ["raw_value"] } +tokio = { version = "1.29.1", features = ["macros"] } +ureq = "2.8.0" +yasna = { version = "0.5.0", features = ["num-bigint"] } diff --git a/attestation-tool/README.md b/attestation-tool/README.md index b55599c..93d5385 100644 --- a/attestation-tool/README.md +++ b/attestation-tool/README.md @@ -1,7 +1,6 @@ # attestation-tool -Tool for testing remote attestation against the Intel SGX's development server -through the Oasis Protocol Foundations IAS proxy. +Tool for testing remote attestation using DCAP and EPID attesttions. [Fortanix]: https://www.fortanix.com/ @@ -41,8 +40,9 @@ The binary will be located in `target/release/attestation-tool`. ## Using -To test remote attestation against the development server, simply run the -resulting binary: +### DCAP + +To test DCAP remote attestation simply run the resulting binary: ``` ./attestation-tool @@ -52,6 +52,47 @@ _NOTE: You might need to run this as `root` user or via `sudo`._ The output may be something like the following: ``` +Testing DCAP (ECDSA) attestation +Using PCCS URL: "https://api.trustedservices.intel.com/sgx/certification/v4/tcb?fmspc=00606a000000" +FMSPC: "00606a000000" +System PCSEVN: 13 +TCB component SVN: [12, 12, 3, 3, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0] +TCB level PCSESVN: 13 +SGX components: [TCBComponent { svn: 12, category: "BIOS", tcb_comp_type: "Early Microcode Update" }, TCBComponent { svn: 12, category: "OS/VMM", tcb_comp_type: "SGX Late Microcode Update" }, TCBComponent { svn: 3, category: "OS/VMM", tcb_comp_type: "TXT SINIT" }, TCBComponent { svn: 3, category: "BIOS", tcb_comp_type: "" }, TCBComponent { svn: 255, category: "", tcb_comp_type: "" }, TCBComponent { svn: 255, category: "", tcb_comp_type: "" }, TCBComponent { svn: 1, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }, TCBComponent { svn: 0, category: "", tcb_comp_type: "" }] +TCB status: SWHardeningNeeded +TCB Advisory IDs: ["INTEL-SA-00615"] +Verifying QE identity +Using PCCS URL: "https://api.trustedservices.intel.com/sgx/certification/v4/qe/identity" +Quoting Enclave: verified and up to date +DCAP (ECDSA) succeeded +``` + +#### Success + +In case the reported TCB status is: `UpToDate` or `SWHardeningNeeded` and +"DCAP (ECDSA) succeeded" is outputed. + +#### Failure + +In case the tool reports "DCAP (ECDSA) failed" or +"DCAP (ECDSA) invalid TCB status: OutOfDate". + +In case DCAP attestation was succesful but an invalid TCB status was reported +make sure that the system platform is up to date (a BIOS update might be +required). + +### (legacy) EPID + +To test (legacy) EPID remote attestation against the development server, include +the `--epid` flag: + +``` +./attestation-tool --epid +``` + +The output may be something like the following: +``` +Testing EPID attestation Using IAS URL: https://iasproxy.fortanix.com/ Enclave report contents: CPUSVN: 13130207ff8006000000000000000000 @@ -87,12 +128,12 @@ Advisory URL: https://security-center.intel.com Advisory IDs: INTEL-SA-00334, INTEL-SA-00615 ``` -### Success +#### Success In case the report omits the `Platform status` section near the end, then your attestation was successful. -### Failure +#### Failure In case the report containes the `Platform status` section near the end, then your attestation was NOT successful. diff --git a/attestation-tool/src/ecdsa.rs b/attestation-tool/src/ecdsa.rs new file mode 100644 index 0000000..1f5db02 --- /dev/null +++ b/attestation-tool/src/ecdsa.rs @@ -0,0 +1,369 @@ +use std::{ffi::CString, str}; + +use oasis_core_runtime::common::sgx::pcs::{QEIdentity, TCBInfo, TCBLevel, TCBStatus}; + +use aesm_client::AesmClient; +use anyhow::{anyhow, Result}; +use byteorder::{ByteOrder, LittleEndian}; +use dcap_ql::quote::Qe3CertDataPckCertChain; +use dcap_ql::quote::{Quote, Quote3SignatureEcdsaP256}; +use mbedtls::{alloc::List as MbedtlsList, x509::certificate::Certificate}; +use rustc_hex::FromHex; +use sgx_isa::{Report, Targetinfo}; +use sgxs_loaders::isgx::Device as IsgxDevice; + +// Intel's PCS signing root certificate. +const PCS_TRUST_ROOT_CERT: &str = r#"-----BEGIN CERTIFICATE----- +MIICjzCCAjSgAwIBAgIUImUM1lqdNInzg7SVUr9QGzknBqwwCgYIKoZIzj0EAwIw +aDEaMBgGA1UEAwwRSW50ZWwgU0dYIFJvb3QgQ0ExGjAYBgNVBAoMEUludGVsIENv +cnBvcmF0aW9uMRQwEgYDVQQHDAtTYW50YSBDbGFyYTELMAkGA1UECAwCQ0ExCzAJ +BgNVBAYTAlVTMB4XDTE4MDUyMTEwNDUxMFoXDTQ5MTIzMTIzNTk1OVowaDEaMBgG +A1UEAwwRSW50ZWwgU0dYIFJvb3QgQ0ExGjAYBgNVBAoMEUludGVsIENvcnBvcmF0 +aW9uMRQwEgYDVQQHDAtTYW50YSBDbGFyYTELMAkGA1UECAwCQ0ExCzAJBgNVBAYT +AlVTMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEC6nEwMDIYZOj/iPWsCzaEKi7 +1OiOSLRFhWGjbnBVJfVnkY4u3IjkDYYL0MxO4mqsyYjlBalTVYxFP2sJBK5zlKOB +uzCBuDAfBgNVHSMEGDAWgBQiZQzWWp00ifODtJVSv1AbOScGrDBSBgNVHR8ESzBJ +MEegRaBDhkFodHRwczovL2NlcnRpZmljYXRlcy50cnVzdGVkc2VydmljZXMuaW50 +ZWwuY29tL0ludGVsU0dYUm9vdENBLmRlcjAdBgNVHQ4EFgQUImUM1lqdNInzg7SV +Ur9QGzknBqwwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQEwCgYI +KoZIzj0EAwIDSQAwRgIhAOW/5QkR+S9CiSDcNoowLuPRLsWGf/Yi7GSX94BgwTwg +AiEA4J0lrHoMs+Xo5o/sX6O9QWxHRAvZUGOdRQ7cvqRXaqI= +-----END CERTIFICATE-----"#; +lazy_static::lazy_static! { + static ref PCS_TRUST_ROOT: MbedtlsList = { + let mut cert_chain = MbedtlsList::new(); + let raw_cert = CString::new(PCS_TRUST_ROOT_CERT.as_bytes()).unwrap(); + let cert = Certificate::from_pem(raw_cert.as_bytes_with_nul()).unwrap(); + cert_chain.push(cert); + + cert_chain + }; +} + +// OIDs for PCK X509 certificate extensions. +const PCK_SGX_EXTENSIONS_OID: &[u64] = &[1, 2, 840, 113741, 1, 13, 1]; +const PCK_SGX_EXTENSIONS_FMSPC_OID: &[u64] = &[1, 2, 840, 113741, 1, 13, 1, 4]; +const PCK_SGX_EXTENSIONS_TCB_OID: &[u64] = &[1, 2, 840, 113741, 1, 13, 1, 2]; + +// TCB url. // TODO: configurable. +const TCB_URL: &str = "https://api.trustedservices.intel.com/sgx/certification/v4/tcb"; +const QE_IDENTITY_URL: &str = + "https://api.trustedservices.intel.com/sgx/certification/v4/qe/identity"; + +#[derive(Clone, Debug, Default, serde::Deserialize)] +/// Response from TCBInfo API. +struct TCBInfoResponse { + #[serde(rename = "tcbInfo")] + pub tcb_info: TCBInfo, +} + +// Taken from TCBLevel.matches (which is a private function). +pub fn tcb_matches(tcb_level: &TCBLevel, tcb_comp_svn: &[u32], pcesvn: u32) -> bool { + // a) Compare all of the SGX TCB Comp SVNs retrieved from the SGX PCK Certificate (from 01 to + // 16) with the corresponding values in the TCB Level. If all SGX TCB Comp SVNs in the + // certificate are greater or equal to the corresponding values in TCB Level, go to b, + // otherwise move to the next item on TCB Levels list. + for (i, comp) in tcb_level.tcb.sgx_components.iter().enumerate() { + // At least one SVN is lower, no match. + if tcb_comp_svn[i] < comp.svn { + return false; + } + } + + // b) Compare PCESVN value retrieved from the SGX PCK certificate with the corresponding value + // in the TCB Level. If it is greater or equal to the value in TCB Level, read status + // assigned to this TCB level. Otherwise, move to the next item on TCB Levels list. + if tcb_level.tcb.pcesvn < pcesvn { + return false; + } + + // Match. + true +} + +#[derive(Clone, Debug, Default, serde::Deserialize)] +struct QEIdentityResponse { + #[serde(rename = "enclaveIdentity")] + pub enclave_identity: QEIdentity, +} + +// Taken from QEIdentity.verify. +fn qe_verify(qe: &QEIdentity, report: &Report) -> Result<()> { + // Verify if MRSIGNER field retrieved from SGX Enclave Report is equal to the value of + // mrsigner field in QE Identity. + let expected_mr_signer: Vec = qe + .mr_signer + .from_hex() + .map_err(|_| anyhow!("malformed QE MRSIGNER"))?; + if expected_mr_signer != report.mrsigner { + return Err(anyhow!("TCB verification failed: QE MRSIGNER mismatch")); + } + + // Verify if ISVPRODID field retrieved from SGX Enclave Report is equal to the value of + // isvprodid field in QE Identity. + if qe.isv_prod_id != report.isvprodid { + return Err(anyhow!("TCB verification failed: QE ISVPRODID mismatch")); + } + + // Apply miscselectMask (binary mask) from QE Identity to MISCSELECT field retrieved from + // SGX Enclave Report. Verify if the outcome (miscselectMask & MISCSELECT) is equal to the + // value of miscselect field in QE Identity. + let raw_miscselect: Vec = qe + .miscselect + .from_hex() + .map_err(|err| anyhow!("malformed QE miscselect: {}", err))?; + if raw_miscselect.len() != 4 { + return Err(anyhow!("malformed QE miscselect")); + } + let raw_miscselect_mask: Vec = qe + .miscselect_mask + .from_hex() + .map_err(|err| anyhow!("malformed QE miscselect mask: {}", err))?; + if raw_miscselect_mask.len() != 4 { + return Err(anyhow!("malformed QE miscselect")); + } + let expected_miscselect = LittleEndian::read_u32(&raw_miscselect); + let miscselect_mask = LittleEndian::read_u32(&raw_miscselect_mask); + if report.miscselect.bits() & miscselect_mask != expected_miscselect { + return Err(anyhow!("TCB verification failed: QE MISCSELECT mismatch")); + } + + // Apply attributesMask (binary mask) from QE Identity to ATTRIBUTES field retrieved from + // SGX Enclave Report. Verify if the outcome (attributesMask & ATTRIBUTES) is equal to the + // value of attributes field in QE Identity. + let raw_attributes: Vec = qe + .attributes + .from_hex() + .map_err(|err| anyhow!("malformed QE attributes: {}", err))?; + if raw_attributes.len() != 16 { + return Err(anyhow!("malformed QE attributes")); + } + let raw_attributes_mask: Vec = qe + .attributes_mask + .from_hex() + .map_err(|err| anyhow!("malformed QE attributes mask: {}", err))?; + if raw_attributes_mask.len() != 16 { + return Err(anyhow!("malformed QE attributes mask")); + } + let expected_flags = LittleEndian::read_u64(&raw_attributes[..8]); + let expected_xfrm = LittleEndian::read_u64(&raw_attributes[8..]); + let flags_mask = LittleEndian::read_u64(&raw_attributes_mask[..8]); + let xfrm_mask = LittleEndian::read_u64(&raw_attributes_mask[8..]); + if report.attributes.flags.bits() & flags_mask != expected_flags { + return Err(anyhow!( + "TCB verification failed: QE ATTRIBUTES mismatch: flags" + )); + } + if report.attributes.xfrm & xfrm_mask != expected_xfrm { + return Err(anyhow!( + "TCB verification failed: QE ATTRIBUTES mismatch: xfrm" + )); + } + + // Determine a TCB status of the Quoting Enclave. + // + // Go over the list of TCB Levels (descending order) and find the one that has ISVSVN that + // is lower or equal to the ISVSVN value from SGX Enclave Report. + if let Some(level) = qe + .tcb_levels + .iter() + .find(|level| level.tcb.isv_svn <= report.isvsvn) + { + // Ensure that the TCB is up to date. + if level.status == TCBStatus::UpToDate { + return Ok(()); + } + } + + Err(anyhow!("TCB verification failed: QE TCB out of date")) +} + +fn get_algorithm_id_from_key(key_id: &Vec) -> u32 { + const ALGORITHM_OFFSET: usize = 154; + + let mut bytes: [u8; 4] = Default::default(); + bytes.copy_from_slice(&key_id[ALGORITHM_OFFSET..ALGORITHM_OFFSET + 4]); + u32::from_le_bytes(bytes) +} + +pub fn try_ecdsa(aesm_client: &AesmClient, loader: &mut IsgxDevice) -> Result { + const SGX_QL_ALG_ECDSA_P256: u32 = 2; + + // Fetch the first supported ECDSA key. + let ecdsa_key_id = aesm_client + .get_supported_att_key_ids() + .map_err(|err| anyhow!("error obtaining attestation key: {}", err))? + .into_iter() + .find(|key_id| SGX_QL_ALG_ECDSA_P256 == get_algorithm_id_from_key(key_id)) + .ok_or(anyhow!("no ecdsa key"))?; + + // Fetch target info. + // Even if ECDSA is not supported the key can be there: https://github.com/intel/linux-sgx/issues/536 + let quote_info = aesm_client + .init_quote_ex(ecdsa_key_id.clone()) + // If this fails with 'AesmCode(UnexpectedError_1)' then ECDSA is likely not supported on this platform. + .map_err(|err| { + anyhow!( + "error initializing quote for ECDSA key (ECDSA unsupported?): {}", + err + ) + })?; + let ti = Targetinfo::try_copy_from(quote_info.target_info()).unwrap(); + let report = report_test::report(&ti, loader).unwrap(); + + // Obtain remote attestation quote from QE. + let res = aesm_client + .get_quote_ex(ecdsa_key_id, report.as_ref().to_owned(), None, vec![0; 16]) + .map_err(|err| anyhow!("error obtaining attestation quote: {}", err))?; + let quote = Quote::parse(res.quote()) + .map_err(|err| anyhow!("error parsing attestation quote: {}", err))?; + + // Verify quote signature. + let sig = quote + .signature::() + .map_err(|err| anyhow!("quote signature type not supported: {}", err))?; + sig.verify_quote_signature(&res.quote()) + .map_err(|err| anyhow!("error verifying quote signature: {}", err))?; + + // Obtain PCK certificate chain. + let certs = sig + .certification_data::() + .map_err(|err| anyhow!("only PCK certificate chain is supported: {}", err))? + .certs; + + // Verify certificate chain. + let mut cert_chain = MbedtlsList::new(); + for raw_cert in &certs { + let raw_cert = CString::new(raw_cert.as_ref())?; + let cert = Certificate::from_pem(raw_cert.as_bytes_with_nul())?; + cert_chain.push(cert); + } + Certificate::verify(&cert_chain, &PCS_TRUST_ROOT, None)?; + + // Extract TCB parameters from the PCK certificate. + let pck_cert = cert_chain.pop_front().unwrap(); + let sgx_extensions = pck_cert + .extensions()? + .into_iter() + .find(|ext| ext.oid.as_ref() == PCK_SGX_EXTENSIONS_OID) + .ok_or(anyhow!( + "TCB verification failed: missing SGX certificate extensions" + ))?; + let mut fmspc: Option> = None; + let mut tcb_comp_svn: Option<[u32; 16]> = None; + let mut pcesvn: Option = None; + yasna::parse_der(&sgx_extensions.value, |reader| { + reader.read_sequence_of(|reader| { + reader.read_sequence(|reader| { + match reader.next().read_oid()?.as_ref() { + PCK_SGX_EXTENSIONS_FMSPC_OID => { + // FMSPC + let raw_fmspc = reader.next().read_bytes()?; + if raw_fmspc.len() != 6 { + return Err(yasna::ASN1Error::new(yasna::ASN1ErrorKind::Invalid)); + } + fmspc = Some(raw_fmspc); + } + PCK_SGX_EXTENSIONS_TCB_OID => { + // TCB + reader.next().read_sequence_of(|reader| { + reader.read_sequence(|reader| { + let comp_id = *reader.next().read_oid()?.as_ref().last().unwrap(); + if (1..=16).contains(&comp_id) { + // TCB Component SVNs + tcb_comp_svn.get_or_insert([0; 16])[(comp_id - 1) as usize] = + reader.next().read_u32()?; + } else if comp_id == 17 { + // PCESVN + pcesvn = Some(reader.next().read_u32()?); + } else if comp_id == 18 { + // CPUSVN + reader.next().read_bytes()?; + } + Ok(()) + }) + })?; + } + _ => { + reader.next().read_der()?; + } + } + + Ok(()) + }) + }) + }) + .map_err(|err| anyhow!("malformed PCK certificate: {}", err))?; + if fmspc.is_none() || tcb_comp_svn.is_none() || pcesvn.is_none() { + return Err(anyhow!("TCB verification failed: missing required fields")); + } + let fmspc = fmspc.unwrap(); + let tcb_comp_svn = tcb_comp_svn.unwrap(); + let pcesvn = pcesvn.unwrap(); + + // Fetch TCB info from PCS. + let url = format!( + "{TCB_URL}?fmspc={fmspc_hex}", + fmspc_hex = hex::encode(&fmspc) + ); + println!("Using PCCS URL: {:?}", url); + let response = ureq::get(&url).call()?; + // XXX: tcb_cert_chain ignored. + let _tcb_cert_chain = response.header("tcb-info-issuer-chain").map(String::from); + let tcb = response + .into_string() + .map_err(|err| anyhow!("error fetching TCB info: {}", err))?; + let tcb: TCBInfoResponse = + serde_json::from_str(&tcb).map_err(|err| anyhow!("error parsing TCB info: {}", err))?; + let tcb = tcb.tcb_info; + + // Validate TCB info. + let expected_fmspc: Vec = tcb + .fmspc + .from_hex() + .map_err(|err| anyhow!("tcb fmspc: {}", err))?; + if fmspc != expected_fmspc { + return Err(anyhow!("TCB verification failed: FMSPC mismatch")); + } + // Find first matching TCB level. + let level = tcb + .tcb_levels + .iter() + .find(|level| tcb_matches(level, &tcb_comp_svn, pcesvn)) + .ok_or(anyhow!( + "Out of date TCB: SVN: {:?}, PCESVN: {:?}", + tcb_comp_svn, + pcesvn + ))? + .clone(); + + println!("FMSPC: {:?}", tcb.fmspc); + println!("System PCSEVN: {:?}", pcesvn); + println!("TCB component SVN: {:?}", tcb_comp_svn); + println!("TCB level PCSESVN: {:?}", level.tcb.pcesvn); + println!("SGX components: {:?}", level.tcb.sgx_components); + println!("TCB status: {:?}", level.status); + println!("TCB Advisory IDs: {:?}", level.advisory_ids); + + println!("Verifying Quoting Enclave"); + // Parse QE3 report. + let qe3_report = sig.qe3_report(); + let mut report = Vec::with_capacity(Report::UNPADDED_SIZE); + report.extend(qe3_report); + report.resize_with(Report::UNPADDED_SIZE, Default::default); + let report = Report::try_copy_from(&report).ok_or(anyhow!("could not construct QE3 report"))?; + + // Fetch QE identity from PCS. + println!("Using PCCS URL: {:?}", QE_IDENTITY_URL); + let response = ureq::get(QE_IDENTITY_URL).call()?; + let qe_identity: QEIdentityResponse = serde_json::from_str(&response.into_string()?) + .map_err(|err| anyhow!("error parsing QE identity: {}", err))?; + let qe_identity = qe_identity.enclave_identity; + + // Verify QE report. + qe_verify(&qe_identity, &report)?; + println!("Quoting Enclave: verified and up to date"); + + // Everything successful return the TCB status. + Ok(level.status) +} diff --git a/attestation-tool/src/main.rs b/attestation-tool/src/main.rs index 845cf0b..9f178bc 100644 --- a/attestation-tool/src/main.rs +++ b/attestation-tool/src/main.rs @@ -10,6 +10,8 @@ extern crate clap; use std::fmt; use std::str; +use oasis_core_runtime::common::sgx::pcs::TCBStatus; + use aesm_client::{AesmClient, QuoteType}; use ias::api::{IasVersion, PlatformStatus, VerifyAttestationEvidenceRequest, LATEST_IAS_VERSION}; use ias::client::ClientBuilder; @@ -19,6 +21,8 @@ use sgx_isa::Targetinfo; use sgxs_loaders::isgx::Device as IsgxDevice; use std::process; +mod ecdsa; + const IAS_OPF_DEV_URL: &'static str = "https://iasproxy-dev.oasis.io/"; const IAS_PROXY_URL: &'static str = "https://iasproxy.fortanix.com/"; const IAS_PROD_OLD_URL: &'static str = "https://as.sgx.trustedservices.intel.com/"; @@ -42,16 +46,46 @@ async fn main() { let matches = clap_app!(attestation_tool => (author: "Fortanix") (about: "SGX Remote Attestation Tool") - (@arg IAS_URL: --("ias") +required +takes_value default_value("opf-dev-proxy") "URL of the IAS to use, or one of the special values \"intel-dev\", \"intel-liv\", \"ftx-proxy\", \"opf-dev-proxy\". Attestation will be skipped if this parameter is not specified.") + (@arg EPID: --("epid") "Test EPID attestation") + (@arg IAS_URL: --("ias") +takes_value default_value("opf-dev-proxy") "URL of the IAS to use, or one of the special values \"intel-dev\", \"intel-liv\", \"ftx-proxy\", \"opf-dev-proxy\". Attestation will be skipped if this parameter is not specified.") (@arg ALT_PATH: --("ias-alt-path") "Use the alternate IAS API paths (default for version 4 and up)") (@arg VERSION: --("version") +takes_value "IAS version to use (2, 3, 4)") (@arg SUBSCRIPTION_KEY: --("subscription-key") +takes_value conflicts_with("CERTIFICATE") "Subscription key to use to authenticate to IAS") (@arg CERTIFICATE: --("client-cert") +takes_value requires("CERTIFICATE_PASS") "Filename of a certificate and private key in PKCS#12 format to use to authenticate to IAS") (@arg CERTIFICATE_PASS: --("client-cert-password") +takes_value "Password for PKCS#12 file") - (@arg DUMP: --("dump") "Dump the report in hex") + (@arg DUMP: --("dump") "Dump the IAS report in hex") (@arg SPID: --("spid") +takes_value "SPID to use") ).get_matches(); + let mut loader = IsgxDevice::new() + .unwrap() + .einittoken_provider(AesmClient::new()) + .build(); + let aesm_client = AesmClient::new(); + + if !matches.is_present("EPID") { + // DCAP. + println!("Testing DCAP (ECDSA) attestation"); + match ecdsa::try_ecdsa(&aesm_client, &mut loader) { + Ok(status) => { + println!("DCAP (ECDSA) succeeded"); + match status { + TCBStatus::UpToDate => (), + TCBStatus::SWHardeningNeeded => (), + status => { + println!("DCAP (ECDSA) invalid TCB status: {:?}", status); + } + } + } + Err(err) => { + println!("DCAP (ECDSA) failed: {}", err); + } + } + return; + } + + // EPID. + println!("Testing EPID attestation"); let version = match matches.value_of("VERSION") { None => LATEST_IAS_VERSION, Some("2") => IasVersion::V2, @@ -94,17 +128,10 @@ async fn main() { } let ias_client = builder.ias_version(version).build(url).unwrap(); - let aesm_client = AesmClient::new(); - let quote = aesm_client.init_quote().unwrap(); let ti = Targetinfo::try_copy_from(quote.target_info()).unwrap(); - let mut loader = IsgxDevice::new() - .unwrap() - .einittoken_provider(AesmClient::new()) - .build(); - let report = report_test::report(&ti, &mut loader).unwrap(); println!("Enclave report contents:");