diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4e3057820..e8d486ab3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,4 +8,4 @@ updates: - package-ecosystem: "cargo" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "daily" + interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26734610a..857d0bddc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,29 +50,3 @@ jobs: - run: cargo install --locked --version "~0.17" cargo-audit - run: cargo audit --ignore RUSTSEC-2020-0159 --ignore RUSTSEC-2020-0071 - license: - name: Check dependencies for licenses - runs-on: ubuntu-latest - outputs: - license_changed: ${{ steps.license_diff.outputs.license_changed }} - steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 - - run: cargo install --locked --version "~0.5" cargo-about - - run: cargo about generate --workspace --output-file "${{ runner.temp }}/licenses.html" about.hbs - - id: license_diff - run: | - if diff -q THIRD_PARTY_LICENSES_RUST_CRATES.html ${{ runner.temp }}/licenses.html ; then - echo "license_changed=NO" >> $GITHUB_OUTPUT - else - echo "license_changed=YES" >> $GITHUB_OUTPUT - fi - - license_update: - name: Check if rust crates license files needs updates - runs-on: ubuntu-latest - needs: license - continue-on-error: true - steps: - - run: test "${{ needs.license.outputs.license_changed }}" == "NO" diff --git a/.github/workflows/license_update.yml b/.github/workflows/license_update.yml new file mode 100644 index 000000000..fb201d502 --- /dev/null +++ b/.github/workflows/license_update.yml @@ -0,0 +1,54 @@ +name: Update THIRD_PARTY_LICENSES_RUST_CRATES.html +on: + schedule: + # Run the job every midnight. + - cron: '0 0 * * *' + workflow_dispatch: + +permissions: + contents: read + +jobs: + update_license: + name: Update THIRD_PARTY_LICENSES_RUST_CRATES.html + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + # Clone the repository and check if THIRD_PARTY_LICENSES_RUST_CRATES.html + # is up-to-date. + - uses: actions/checkout@v3.5.0 + with: + persist-credentials: false + - run: cargo install --locked --version "~0.5" cargo-about + - run: cargo about generate --workspace --output-file THIRD_PARTY_LICENSES_RUST_CRATES.html about.hbs + - id: checkgitdiff # Early exit if there is no diff. + run: | + git diff --exit-code --quiet + [ $? -eq 0 ] && { + echo "THIRD_PARTY_LICENSES_RUST_CRATES.html is up-to-date." + gh run cancel ${{ github.run_id }} + gh run watch ${{ github.run_id }} + } + continue-on-error: true + # Delete existing rust-crates-license-update branch. + - uses: dawidd6/action-delete-branch@v3 + with: + github_token: ${{github.token}} + branches: rust-crates-license-update + # Create a new PR. + - uses: gr2m/create-or-update-pull-request-action@v1.x + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # https://github.com/actions/checkout/pull/1184 + author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + branch: rust-crates-license-update + title: 'doc: update THIRD_PARTY_LICENSES_RUST_CRATES.html' + body: > + THIRD_PARTY_LICENSES_RUST_CRATES.html needs an update. This is an automatically generated PR by + a GitHub Action. + commit-message: 'doc: update THIRD_PARTY_LICENSES_RUST_CRATES.html' + + diff --git a/Cargo.lock b/Cargo.lock index 82c853558..febe3fb09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -86,29 +92,30 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bindgen" -version = "0.64.0" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags", + "bitflags 2.4.0", "cexpr", "clang-sys", "lazy_static", "lazycell", "log", "peeking_take_while", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn", + "syn 2.0.37", "which", ] @@ -118,6 +125,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "block-buffer" version = "0.9.0" @@ -180,18 +193,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "serde", - "time", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -207,12 +219,12 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.23" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_lex", "indexmap", "strsim", @@ -296,7 +308,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 1.0.109", ] [[package]] @@ -313,7 +325,7 @@ checksum = "34fa7e395dc1c001083c7eed28c8f0f0b5a225610f3b6284675f444af6fab86b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -347,7 +359,7 @@ version = "0.1.0" dependencies = [ "aws-nitro-enclaves-image-format", "libc", - "nix 0.23.1", + "nix 0.26.2", "sha2", "tempfile", "vsock", @@ -364,7 +376,7 @@ name = "enclave_build" version = "0.1.0" dependencies = [ "aws-nitro-enclaves-image-format", - "base64 0.21.0", + "base64 0.21.4", "clap", "futures", "log", @@ -504,9 +516,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -519,9 +531,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -529,15 +541,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -546,38 +558,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.37", ] [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -621,7 +633,7 @@ checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -807,7 +819,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf888f9575c290197b2c948dc9e9ff10bd1a39ad1ea8585f734585fa6b9d3f9" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-core", "inotify-sys", "libc", @@ -883,9 +895,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.141" +version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" [[package]] name = "libloading" @@ -966,6 +978,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.16" @@ -996,7 +1017,7 @@ checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.45.0", ] @@ -1017,7 +1038,7 @@ dependencies = [ "lazy_static", "libc", "log", - "nix 0.23.1", + "nix 0.26.2", "num-derive", "num-traits", "openssl", @@ -1034,27 +1055,28 @@ dependencies = [ [[package]] name = "nix" -version = "0.23.1" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", - "cc", + "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.5", ] [[package]] name = "nix" -version = "0.24.3" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", - "memoffset", + "memoffset 0.7.1", + "pin-utils", + "static_assertions", ] [[package]] @@ -1085,17 +1107,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", + "syn 1.0.109", ] [[package]] @@ -1131,11 +1143,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.49" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2f106ab837a24e03672c59b1239669a0596406ff657c3c0835b6b7f0f35a33" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags", + "bitflags 2.4.0", "cfg-if", "foreign-types", "libc", @@ -1152,14 +1164,14 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "openssl-sys" -version = "0.9.84" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a20eace9dc2d82904039cb76dcf50fb1a0bba071cfd1629720b5d6f1ddba0fa" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -1250,7 +1262,7 @@ checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1261,7 +1273,7 @@ checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1288,20 +1300,30 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2", + "syn 2.0.37", +] + [[package]] name = "proc-macro2" -version = "1.0.53" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.16" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4af2ec4714533fcdf07e886f17025ace8b997b9ce51204ee69b6da831c3da57" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1342,7 +1364,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1351,7 +1373,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1383,7 +1405,7 @@ version = "0.36.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno 0.2.8", "io-lifetimes", "libc", @@ -1397,7 +1419,7 @@ version = "0.37.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d097081ed288dfe45699b72f5b5d648e5f15d64d900c7080273baa20c16a6849" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno 0.3.0", "io-lifetimes", "libc", @@ -1431,9 +1453,9 @@ checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "serde" -version = "1.0.147" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] @@ -1459,20 +1481,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.147" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -1487,7 +1509,7 @@ checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1591,14 +1613,20 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", ] +[[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.10.0" @@ -1616,6 +1644,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tar" version = "0.4.38" @@ -1672,7 +1711,7 @@ checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1684,17 +1723,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "tinyvec" version = "1.5.1" @@ -1712,9 +1740,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.26.0" +version = "1.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" dependencies = [ "autocfg", "libc", @@ -1722,7 +1750,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "socket2", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1837,7 +1865,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd64fe09d8e880e600c324e7d664760a17f56e9672b7495a86381b49e4f72f46" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", ] @@ -1860,7 +1888,7 @@ dependencies = [ "env_logger", "idna", "log", - "nix 0.23.1", + "nix 0.26.2", "rand", "tempfile", "threadpool", @@ -1878,12 +1906,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1911,7 +1933,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -1933,7 +1955,7 @@ checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2005,7 +2027,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.1", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] @@ -2014,21 +2045,42 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.1", "windows_aarch64_msvc 0.42.1", "windows_i686_gnu 0.42.1", "windows_i686_msvc 0.42.1", "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.1", "windows_x86_64_msvc 0.42.1", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "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 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.32.0" @@ -2041,6 +2093,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.32.0" @@ -2053,6 +2111,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.32.0" @@ -2065,6 +2129,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.32.0" @@ -2077,12 +2147,24 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.32.0" @@ -2095,6 +2177,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "xattr" version = "0.2.2" diff --git a/Cargo.toml b/Cargo.toml index 8e43fc597..66988c11e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ chrono = "0.4" clap = "3.2" inotify = "0.10" serde_json = "1.0" -nix = "0.23" +nix = "0.26" log = "0.4" libc = { version = ">=0.2.69" } flexi_logger = "0.25" diff --git a/bootstrap/allocator.yaml b/bootstrap/allocator.yaml index f31b81268..a29be92cd 100644 --- a/bootstrap/allocator.yaml +++ b/bootstrap/allocator.yaml @@ -7,7 +7,7 @@ memory_mib: 512 # How many CPUs to reserve for enclaves. cpu_count: 2 # -# Alternatively, the exact CPUs to be reserved for the enclave can be explicitely +# Alternatively, the exact CPUs to be reserved for the enclave can be explicitly # configured by using `cpu_pool` (like below), instead of `cpu_count`. # Note: cpu_count and cpu_pool conflict with each other. Only use exactly one of them. # Example of reserving CPUs 2, 3, and 6 through 9: diff --git a/docs/centos_stream_8_how_to_install_nitro_cli_from_github_sources.md b/docs/centos_stream_8_how_to_install_nitro_cli_from_github_sources.md index a3f3a2920..acb83adec 100644 --- a/docs/centos_stream_8_how_to_install_nitro_cli_from_github_sources.md +++ b/docs/centos_stream_8_how_to_install_nitro_cli_from_github_sources.md @@ -181,7 +181,7 @@ memory_mib: 512 # How many CPUs to reserve for enclaves. cpu_count: 2 # -# Alternatively, the exact CPUs to be reserved for the enclave can be explicitely +# Alternatively, the exact CPUs to be reserved for the enclave can be explicitly # configured by using `cpu_pool` (like below), instead of `cpu_count`. # Note: cpu_count and cpu_pool conflict with each other. Only use exactly one of them. # Example of reserving CPUs 2, 3, and 6 through 9: diff --git a/docs/fedora_34_how_to_install_nitro_cli_from_github_sources.md b/docs/fedora_34_how_to_install_nitro_cli_from_github_sources.md index 8395078bc..2d6bd26f9 100644 --- a/docs/fedora_34_how_to_install_nitro_cli_from_github_sources.md +++ b/docs/fedora_34_how_to_install_nitro_cli_from_github_sources.md @@ -189,7 +189,7 @@ memory_mib: 512 # How many CPUs to reserve for enclaves. cpu_count: 2 # -# Alternatively, the exact CPUs to be reserved for the enclave can be explicitely +# Alternatively, the exact CPUs to be reserved for the enclave can be explicitly # configured by using `cpu_pool` (like below), instead of `cpu_count`. # Note: cpu_count and cpu_pool conflict with each other. Only use exactly one of them. # Example of reserving CPUs 2, 3, and 6 through 9: diff --git a/docs/rhel_8.4_how_to_install_nitro_cli_from_github_sources.md b/docs/rhel_8.4_how_to_install_nitro_cli_from_github_sources.md index 4af9c6f62..ce42e3aa1 100644 --- a/docs/rhel_8.4_how_to_install_nitro_cli_from_github_sources.md +++ b/docs/rhel_8.4_how_to_install_nitro_cli_from_github_sources.md @@ -185,7 +185,7 @@ memory_mib: 512 # How many CPUs to reserve for enclaves. cpu_count: 2 # -# Alternatively, the exact CPUs to be reserved for the enclave can be explicitely +# Alternatively, the exact CPUs to be reserved for the enclave can be explicitly # configured by using `cpu_pool` (like below), instead of `cpu_count`. # Note: cpu_count and cpu_pool conflict with each other. Only use exactly one of them. # Example of reserving CPUs 2, 3, and 6 through 9: diff --git a/docs/ubuntu_20.04_how_to_install_nitro_cli_from_github_sources.md b/docs/ubuntu_20.04_how_to_install_nitro_cli_from_github_sources.md index f3011d2d9..d8878ce64 100644 --- a/docs/ubuntu_20.04_how_to_install_nitro_cli_from_github_sources.md +++ b/docs/ubuntu_20.04_how_to_install_nitro_cli_from_github_sources.md @@ -188,7 +188,7 @@ memory_mib: 512 # How many CPUs to reserve for enclaves. cpu_count: 2 # -# Alternatively, the exact CPUs to be reserved for the enclave can be explicitely +# Alternatively, the exact CPUs to be reserved for the enclave can be explicitly # configured by using `cpu_pool` (like below), instead of `cpu_count`. # Note: cpu_count and cpu_pool conflict with each other. Only use exactly one of them. # Example of reserving CPUs 2, 3, and 6 through 9: diff --git a/eif_loader/Cargo.toml b/eif_loader/Cargo.toml index 248e98a48..a2394a62c 100644 --- a/eif_loader/Cargo.toml +++ b/eif_loader/Cargo.toml @@ -9,7 +9,7 @@ rust-version = "1.60" [dependencies] aws-nitro-enclaves-image-format = "0.2" -nix = "0.23" +nix = "0.26" libc = "0.2" vsock = "0.3" diff --git a/enclave_build/Cargo.toml b/enclave_build/Cargo.toml index c5cc84170..f86b74874 100644 --- a/enclave_build/Cargo.toml +++ b/enclave_build/Cargo.toml @@ -14,11 +14,11 @@ serde_yaml = "0.8" serde_json = "1.0" shiplift = "0.7" tempfile = "3.5.0" -tokio = { version = "1.26", features = ["rt-multi-thread"] } +tokio = { version = "1.27", features = ["rt-multi-thread"] } base64 = "0.21" log = "0.4" url = "2.3" sha2 = "0.9.5" -futures = "0.3.27" +futures = "0.3.28" aws-nitro-enclaves-image-format = "0.2" diff --git a/enclave_build/src/docker.rs b/enclave_build/src/docker.rs index 095d2e74e..31436ca6a 100644 --- a/enclave_build/src/docker.rs +++ b/enclave_build/src/docker.rs @@ -406,14 +406,7 @@ mod tests { /// Test extracted configuration is as expected #[test] fn test_config() { - #[cfg(target_arch = "x86_64")] - let docker = DockerUtil::new(String::from( - "667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-x86_64", - )); - #[cfg(target_arch = "aarch64")] - let docker = DockerUtil::new(String::from( - "667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-aarch64", - )); + let docker = DockerUtil::new(String::from("public.ecr.aws/aws-nitro-enclaves/hello:v1")); let (cmd_file, env_file) = docker.load().unwrap(); let mut cmd_file = File::open(cmd_file.path()).unwrap(); @@ -421,18 +414,14 @@ mod tests { let mut cmd = String::new(); cmd_file.read_to_string(&mut cmd).unwrap(); - assert_eq!( - cmd, - "/bin/sh\n\ - -c\n\ - ./vsock-sample server --port 5005\n" - ); + assert_eq!(cmd, "/bin/hello.sh\n"); let mut env = String::new(); env_file.read_to_string(&mut env).unwrap(); assert_eq!( env, - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n" + "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n\ + HELLO=Hello from the enclave side!\n" ); } } diff --git a/run_tests.sh b/run_tests.sh index 1fb8cccfc..83e88dea4 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -15,10 +15,6 @@ export NITRO_CLI_ARTIFACTS="${SCRIPTDIR}/build" ARCH="$(uname -m)" AWS_ACCOUNT_ID=667861386598 -ECR_REGION=us-east-1 -ECR_URL="$AWS_ACCOUNT_ID.dkr.ecr.$ECR_REGION.amazonaws.com" - -aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_URL # Indicate that the test suite has failed function register_test_fail() { @@ -30,8 +26,9 @@ function clean_up_and_exit() { [ "$(lsmod | grep -cw nitro_enclaves)" -eq 0 ] || rmmod nitro_enclaves || register_test_fail make clean rm -rf test_images + # Cleanup pulled images during testing - docker rmi 667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-"${ARCH}" 2> /dev/null || true + docker rmi public.ecr.aws/aws-nitro-enclaves/hello:v1 2> /dev/null || true docker rmi hello-world:latest 2> /dev/null || true rm -rf examples/"${ARCH}"/hello-entrypoint @@ -88,8 +85,8 @@ mkdir -p test_images || test_failed export HOME="/root" # Simple EIF -nitro-cli build-enclave --docker-uri 667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-"${ARCH}" \ - --output-file test_images/vsock-sample-server-"${ARCH}".eif || test_failed +nitro-cli build-enclave --docker-uri public.ecr.aws/aws-nitro-enclaves/hello:v1 \ + --output-file test_images/hello.eif || test_failed # Generate signing certificate openssl ecparam -name secp384r1 -genkey -out test_images/key.pem || test_failed @@ -98,8 +95,8 @@ openssl req -new -key test_images/key.pem -sha384 -nodes \ openssl x509 -req -days 20 -in test_images/csr.pem -out test_images/cert.pem \ -sha384 -signkey test_images/key.pem || test_failed # Signed EIF -nitro-cli build-enclave --docker-uri 667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-"${ARCH}" \ - --output-file test_images/vsock-sample-server-"${ARCH}"-signed.eif \ +nitro-cli build-enclave --docker-uri public.ecr.aws/aws-nitro-enclaves/hello:v1 \ + --output-file test_images/hello-signed.eif \ --private-key test_images/key.pem --signing-certificate test_images/cert.pem || test_failed diff --git a/src/common/document_errors.rs b/src/common/document_errors.rs index fe9548f60..3244a7416 100644 --- a/src/common/document_errors.rs +++ b/src/common/document_errors.rs @@ -217,7 +217,7 @@ pub fn get_detailed_info(error_code_str: String, additional_info: &[String]) -> } else { ret.push_str( format!( - "Insufficient memory requested. User provided `{}` is {} MB, and memory should be greated than 0 MB.", + "Insufficient memory requested. User provided `{}` is {} MB, and memory should be greater than 0 MB.", additional_info.get(0).unwrap_or(&info_placeholder), additional_info.get(1).unwrap_or(&info_placeholder) ).as_str(), @@ -227,7 +227,7 @@ pub fn get_detailed_info(error_code_str: String, additional_info: &[String]) -> "E27" => { ret.push_str( format!( - "Insufficient memory available. User provided `{}` is {} MB, which is more than the available hugepage memory.\nYou can increase the available memory by editing the `memory_mib` value from '/etc/nitro_enclaves/allocator.yaml' and then enable the nitro-enclaves-allocator.service.", + "Insufficient memory available. User provided `{}` is {} MB, which is more than the available hugepage memory.\nYou can increase the available memory by editing the `memory_mib` value from '/etc/nitro_enclaves/allocator.yaml' and then restart the nitro-enclaves-allocator.service.", additional_info.get(0).unwrap_or(&info_placeholder), additional_info.get(1).unwrap_or(&info_placeholder) ).as_str(), diff --git a/src/common/logger.rs b/src/common/logger.rs index 0ac9363bb..8fe7f6c1d 100644 --- a/src/common/logger.rs +++ b/src/common/logger.rs @@ -89,7 +89,7 @@ impl EnclaveProcLogWriter { /// Generate a single message string. fn create_msg(&self, now: &DateTime, record: &Record) -> NitroCliResult { // UTC timestamp according to RFC 2822 - let timestamp = DateTime::::from_utc(now.naive_utc(), Utc) + let timestamp = DateTime::::from_naive_utc_and_offset(now.naive_utc(), Utc) .to_rfc3339_opts(chrono::SecondsFormat::Millis, true); let logger_id = self.logger_id.lock().map_err(|e| { new_nitro_cli_failure!( diff --git a/src/enclave_proc/commands.rs b/src/enclave_proc/commands.rs index 4ee0c05df..30c23b41b 100644 --- a/src/enclave_proc/commands.rs +++ b/src/enclave_proc/commands.rs @@ -34,7 +34,7 @@ pub struct DescribeThreadResult { /// Thread handle from parallel computing of PCRs and fetching of metadata pub type DescribeThread = Option>>; -/// Information retuned by run_enclave function. +/// Information returned by run_enclave function. pub struct RunEnclaveResult { /// Manager structure describing the enclave. pub enclave_manager: EnclaveManager, diff --git a/src/enclave_proc/resource_manager.rs b/src/enclave_proc/resource_manager.rs index b0651d098..5454d1345 100644 --- a/src/enclave_proc/resource_manager.rs +++ b/src/enclave_proc/resource_manager.rs @@ -386,7 +386,7 @@ impl ResourceAllocator { // larger-page allocations (Ex: if we have 1 x 1 GB page and 1 x 2 MB page, but // we want to allocate only 512 MB, the above algorithm will have allocated only // the 2 MB page, since the 1 GB page was too large for what was needed; we now - // need to allocate in increasing order of page size in order to reduce westage). + // need to allocate in increasing order of page size in order to reduce wastage). if needed_mem > 0 { for (_, page_info) in HUGE_PAGE_MAP.iter().rev().enumerate() { @@ -402,7 +402,7 @@ impl ResourceAllocator { } } - // If we still have memory to alocate, it means we have insufficient resources. + // If we still have memory to allocate, it means we have insufficient resources. if needed_mem > 0 { return Err(new_nitro_cli_failure!( &format!( @@ -756,7 +756,7 @@ impl EnclaveHandle { .map_err(|e| e.add_subaction("Failed to release used memory".to_string()))?; info!("Enclave terminated."); - // Mark enclave as termiated. + // Mark enclave as terminated. self.clear(); } @@ -1144,7 +1144,7 @@ fn write_eif_to_regions( })?; if written_plus_region_size <= image_write_offset { - // All bytes need to be skiped to get to the image write offset. + // All bytes need to be skipped to get to the image write offset. } else { let region_offset = image_write_offset.saturating_sub(total_written); let file_offset = total_written.saturating_sub(image_write_offset); diff --git a/src/enclave_proc_comm.rs b/src/enclave_proc_comm.rs index a098614fa..7fd12e7cd 100644 --- a/src/enclave_proc_comm.rs +++ b/src/enclave_proc_comm.rs @@ -190,7 +190,7 @@ where // Get the number of expected replies. let mut num_replies_expected = comms.len() - num_errors; - let mut events = vec![EpollEvent::empty(); 1]; + let mut events = [EpollEvent::empty(); 1]; while num_replies_expected > 0 { let num_events = loop { diff --git a/src/lib.rs b/src/lib.rs index 3b27ca74a..e9d6f296a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -609,7 +609,10 @@ macro_rules! create_app { .arg( Arg::with_name("memory") .long("memory") - .help("Memory to allocate for the enclave in MB") + .help( + "Memory to allocate for the enclave in MB. Depending on the available \ + pages, more might be allocated." + ) .required_unless("config") .takes_value(true) .conflicts_with("config"), @@ -637,7 +640,7 @@ macro_rules! create_app { "Starts enclave in debug-mode. This makes the console of the enclave \ available over vsock at CID: VMADDR_CID_HYPERVISOR (0), port: \ enclave_cid + 10000. \n The stream could be accessed with the console \ - sub-command" , + sub-command" ) .conflicts_with("config"), ) diff --git a/src/utils.rs b/src/utils.rs index dd17ebf49..bc368f5c1 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -7,7 +7,7 @@ use libc::{c_void, close}; use nix::poll::poll; use nix::poll::{PollFd, PollFlags}; use nix::sys::socket::{connect, socket}; -use nix::sys::socket::{AddressFamily, SockAddr, SockFlag, SockType}; +use nix::sys::socket::{AddressFamily, SockFlag, SockType, VsockAddr}; use nix::sys::time::{TimeVal, TimeValLike}; use nix::unistd::read; use std::io::Write; @@ -73,7 +73,7 @@ impl Console { ) })?; - let sockaddr = SockAddr::new_vsock(cid, port); + let sockaddr = VsockAddr::new(cid, port); vsock_set_connect_timeout(socket_fd, CONSOLE_CONNECT_TIMEOUT).map_err(|err| { err.add_subaction("Failed to set console connect timeout".to_string()) @@ -109,7 +109,7 @@ impl Console { err.add_subaction("Failed to set console connect timeout".to_string()) })?; - let sockaddr = SockAddr::new_vsock(cid, port); + let sockaddr = VsockAddr::new(cid, port); let result = connect(socket_fd, &sockaddr); match result { diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index 4e5efaf3b..f80e0ea43 100755 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -15,8 +15,8 @@ TEST_IMAGES = "test_images/" ARCH = subprocess.run(["uname", "-m"], stdout=PIPE, stderr=PIPE, check=False).stdout.decode('UTF-8').rstrip("\n") -SAMPLE_EIF = "vsock-sample-server-" + ARCH + ".eif" -SIGNED_EIF = "vsock-sample-server-" + ARCH + "-signed.eif" +SAMPLE_EIF = "hello.eif" +SIGNED_EIF = "hello-signed.eif" SIGN_CERT = "cert.pem" diff --git a/tests/tests.rs b/tests/tests.rs index 5a7970394..2c129a1d5 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -34,12 +34,28 @@ mod tests { use openssl::x509::{X509Name, X509}; // Remote Docker image + const SAMPLE_DOCKER: &str = "public.ecr.aws/aws-nitro-enclaves/hello:v1"; + #[cfg(target_arch = "x86_64")] - const SAMPLE_DOCKER: &str = - "667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-x86_64"; + mod sample_docker_pcrs { + /// PCR0 + pub const IMAGE_PCR: &str = "7f3287dd1c4dbc49513abfaabc7f6afe79ab8269743c0c4ee55bb9e92d4f0a36f0cae7c0356d0bfec78b59b4d20c689c"; + /// PCR1 + pub const KERNEL_PCR: &str = "bcdf05fefccaa8e55bf2c8d6dee9e79bbff31e34bf28a99aa19e6b29c37ee80b214a414b7607236edf26fcb78654e63f"; + /// PCR2 + pub const APP_PCR: &str = "dd61366a5424eea46f60c4e9d59e6c645a46420ccf962550ee1f3c109d230f88ec23667617aeaac425a1f50fe8e384d7"; + } + #[cfg(target_arch = "aarch64")] - const SAMPLE_DOCKER: &str = - "667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-aarch64"; + mod sample_docker_pcrs { + /// PCR0 + pub const IMAGE_PCR: &str = "b32a774b09fff4324a6405dacf3f5aa462a75e554e3a563ee64708abd585456bb480fdf70b2e2c2ab9ec205717bc690e"; + /// PCR1 + pub const KERNEL_PCR: &str = "5d3938eb05288e20a981038b1861062ff4174884968a39aee5982b312894e60561883576cc7381d1a7d05b809936bd16"; + /// PCR2 + pub const APP_PCR: &str = "9397173aa14e47fe087e8aeb63928a233db048e290830de6ce2041f4580f83b599c48432467601bed8a4883e9d94ff10"; + } + // Local Docker image const COMMAND_EXECUTER_DOCKER: &str = "command_executer:eif"; @@ -50,8 +66,7 @@ mod tests { fn setup_env() { if std::env::var("NITRO_CLI_BLOBS").is_err() { - let home = std::env::var("HOME").unwrap(); - std::env::set_var("NITRO_CLI_BLOBS", format!("{}/.nitro_cli/prebuilt", home)); + std::env::set_var("NITRO_CLI_BLOBS", "/usr/share/nitro_enclaves/blobs"); } } @@ -102,35 +117,17 @@ mod tests { ) .expect("Docker build failed") .1; - #[cfg(target_arch = "x86_64")] assert_eq!( measurements.get("PCR0").unwrap(), - "c22753ee2f1733872a86fbeb8656625f126dc57fe55609155678d15a71dc9543583fc129c051cef12045adaee8795803" - ); - #[cfg(target_arch = "aarch64")] - assert_eq!( - measurements.get("PCR0").unwrap(), - "adf436d453f5dc7f805ca4c867ea3d639955838d7649c293ae8c3feb9c769c3391a11c502ef304bc2968bbd3d7a4f25e" - ); - #[cfg(target_arch = "x86_64")] - assert_eq!( - measurements.get("PCR1").unwrap(), - "bcdf05fefccaa8e55bf2c8d6dee9e79bbff31e34bf28a99aa19e6b29c37ee80b214a414b7607236edf26fcb78654e63f" + sample_docker_pcrs::IMAGE_PCR ); - #[cfg(target_arch = "aarch64")] assert_eq!( measurements.get("PCR1").unwrap(), - "5d3938eb05288e20a981038b1861062ff4174884968a39aee5982b312894e60561883576cc7381d1a7d05b809936bd16" + sample_docker_pcrs::KERNEL_PCR ); - #[cfg(target_arch = "x86_64")] assert_eq!( measurements.get("PCR2").unwrap(), - "10ffd6773d365539696fa3520c28312cf657152fc3f89538d02af5e8b579e964a9f9a5c763470a122763f4fd0a1dd2d7" - ); - #[cfg(target_arch = "aarch64")] - assert_eq!( - measurements.get("PCR2").unwrap(), - "28737c9aa5d964c0daaddd1460b7b50c46788f1c037aa6317d66b3eb95823840c0ae774e6ee744deb8293265d97bbd1f" + sample_docker_pcrs::APP_PCR ); } @@ -266,35 +263,18 @@ mod tests { ) .expect("Docker build failed") .1; - #[cfg(target_arch = "x86_64")] - assert_eq!( - measurements.get("PCR0").unwrap(), - "c22753ee2f1733872a86fbeb8656625f126dc57fe55609155678d15a71dc9543583fc129c051cef12045adaee8795803" - ); - #[cfg(target_arch = "aarch64")] + assert_eq!( measurements.get("PCR0").unwrap(), - "adf436d453f5dc7f805ca4c867ea3d639955838d7649c293ae8c3feb9c769c3391a11c502ef304bc2968bbd3d7a4f25e" + sample_docker_pcrs::IMAGE_PCR ); - #[cfg(target_arch = "x86_64")] assert_eq!( measurements.get("PCR1").unwrap(), - "bcdf05fefccaa8e55bf2c8d6dee9e79bbff31e34bf28a99aa19e6b29c37ee80b214a414b7607236edf26fcb78654e63f" - ); - #[cfg(target_arch = "aarch64")] - assert_eq!( - measurements.get("PCR1").unwrap(), - "5d3938eb05288e20a981038b1861062ff4174884968a39aee5982b312894e60561883576cc7381d1a7d05b809936bd16" - ); - #[cfg(target_arch = "x86_64")] - assert_eq!( - measurements.get("PCR2").unwrap(), - "10ffd6773d365539696fa3520c28312cf657152fc3f89538d02af5e8b579e964a9f9a5c763470a122763f4fd0a1dd2d7" + sample_docker_pcrs::KERNEL_PCR ); - #[cfg(target_arch = "aarch64")] assert_eq!( measurements.get("PCR2").unwrap(), - "28737c9aa5d964c0daaddd1460b7b50c46788f1c037aa6317d66b3eb95823840c0ae774e6ee744deb8293265d97bbd1f" + sample_docker_pcrs::APP_PCR ); } @@ -744,38 +724,19 @@ mod tests { get_enclave_describe_info(&enclave_manager, false).unwrap(); let build_info = enclave_manager.get_measurements().unwrap(); - let enclave_name = enclave_manager.enclave_name.clone(); + let measurements = build_info.measurements; - assert_eq!(enclave_name, "testName"); - #[cfg(target_arch = "x86_64")] assert_eq!( - build_info.measurements.get(&"PCR0".to_string()).unwrap(), - "c22753ee2f1733872a86fbeb8656625f126dc57fe55609155678d15a71dc9543583fc129c051cef12045adaee8795803" - ); - #[cfg(target_arch = "aarch64")] - assert_eq!( - build_info.measurements.get(&"PCR0".to_string()).unwrap(), - "adf436d453f5dc7f805ca4c867ea3d639955838d7649c293ae8c3feb9c769c3391a11c502ef304bc2968bbd3d7a4f25e" - ); - #[cfg(target_arch = "x86_64")] - assert_eq!( - build_info.measurements.get(&"PCR1".to_string()).unwrap(), - "bcdf05fefccaa8e55bf2c8d6dee9e79bbff31e34bf28a99aa19e6b29c37ee80b214a414b7607236edf26fcb78654e63f" - ); - #[cfg(target_arch = "aarch64")] - assert_eq!( - build_info.measurements.get(&"PCR1".to_string()).unwrap(), - "5d3938eb05288e20a981038b1861062ff4174884968a39aee5982b312894e60561883576cc7381d1a7d05b809936bd16" + measurements.get("PCR0").unwrap(), + sample_docker_pcrs::IMAGE_PCR ); - #[cfg(target_arch = "x86_64")] assert_eq!( - build_info.measurements.get(&"PCR2".to_string()).unwrap(), - "10ffd6773d365539696fa3520c28312cf657152fc3f89538d02af5e8b579e964a9f9a5c763470a122763f4fd0a1dd2d7" + measurements.get("PCR1").unwrap(), + sample_docker_pcrs::KERNEL_PCR ); - #[cfg(target_arch = "aarch64")] assert_eq!( - build_info.measurements.get(&"PCR2".to_string()).unwrap(), - "28737c9aa5d964c0daaddd1460b7b50c46788f1c037aa6317d66b3eb95823840c0ae774e6ee744deb8293265d97bbd1f" + measurements.get("PCR2").unwrap(), + sample_docker_pcrs::APP_PCR ); let _enclave_id = generate_enclave_id(0).expect("Describe enclaves failed"); @@ -862,17 +823,7 @@ mod tests { metadata.build_info.build_tool_version, env!("CARGO_PKG_VERSION") ); - #[cfg(target_arch = "x86_64")] - assert_eq!( - *metadata - .docker_info - .get("RepoTags") - .unwrap() - .get(0) - .unwrap(), - json!("667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-x86_64") - ); - #[cfg(target_arch = "aarch64")] + assert_eq!( *metadata .docker_info @@ -880,8 +831,9 @@ mod tests { .unwrap() .get(0) .unwrap(), - json!("667861386598.dkr.ecr.us-east-1.amazonaws.com/enclaves-samples:vsock-sample-server-aarch64") + json!("public.ecr.aws/aws-nitro-enclaves/hello:v1") ); + assert_eq!( *metadata.custom_info.get("AppVersion").unwrap(), json!("3.2") diff --git a/vsock_proxy/Cargo.lock b/vsock_proxy/Cargo.lock deleted file mode 100644 index 78dc37b0f..000000000 --- a/vsock_proxy/Cargo.lock +++ /dev/null @@ -1,496 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aho-corasick" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi", -] - -[[package]] -name = "atty" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "c2-chacha" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" -dependencies = [ - "ppv-lite86", -] - -[[package]] -name = "cc" -version = "1.0.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clap" -version = "2.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "dns-lookup" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13988670860b076248c74e1b54444efc4f1dec70c8bb25da4b7c0024396b72bf" -dependencies = [ - "libc", - "socket2", - "winapi", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "fastrand" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" -dependencies = [ - "instant", -] - -[[package]] -name = "getrandom" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "wasi", -] - -[[package]] -name = "hermit-abi" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" -dependencies = [ - "libc", -] - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "idna" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "libc" -version = "0.2.126" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" - -[[package]] -name = "linked-hash-map" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "nix" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" -dependencies = [ - "bitflags", - "cc", - "cfg-if 1.0.0", - "libc", - "memoffset", -] - -[[package]] -name = "num_cpus" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "rand" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" -dependencies = [ - "getrandom", - "libc", - "rand_chacha", - "rand_core", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" -dependencies = [ - "c2-chacha", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi", -] - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[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", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "threadpool" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c8070a9942f5e7cfccd93f490fdebd230ee3c3c9f107cb25bad5351ef671cf" -dependencies = [ - "smallvec", -] - -[[package]] -name = "unicode-width" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20" - -[[package]] -name = "vec_map" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" - -[[package]] -name = "vsock" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e32675ee2b3ce5df274c0ab52d19b28789632406277ca26bffee79a8e27dc133" -dependencies = [ - "libc", - "nix", -] - -[[package]] -name = "vsock-proxy" -version = "0.1.0" -dependencies = [ - "clap", - "dns-lookup", - "env_logger", - "idna", - "log", - "nix", - "rand", - "tempfile", - "threadpool", - "vsock", - "yaml-rust", -] - -[[package]] -name = "wasi" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" - -[[package]] -name = "winapi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] diff --git a/vsock_proxy/Cargo.toml b/vsock_proxy/Cargo.toml index 32d6e073d..e180b09cb 100644 --- a/vsock_proxy/Cargo.toml +++ b/vsock_proxy/Cargo.toml @@ -13,7 +13,7 @@ dns-lookup = "1.0.1" env_logger = "0.10" idna = "0.3.0" log = "0.4" -nix = "0.23" +nix = "0.26" yaml-rust = "0.4.3" threadpool = "1.7.1" vsock = "0.3"