From 5fb368ae0555d94d099da9afe652eec7f5acf29c Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 9 Feb 2024 17:18:41 +0800 Subject: [PATCH] partial progress on porting to ring-0.17 --- Cargo.lock | 138 +++++++++++++-------- Cargo.toml | 6 +- apps/app-loader/Cargo.toml | 4 +- apps/chat-test/Cargo.toml | 4 +- apps/mtxchat/Cargo.toml | 4 +- apps/mtxcli/Cargo.toml | 2 +- apps/vault/tools/vaultbackup-rs/Cargo.toml | 10 +- libs/tls/Cargo.toml | 10 +- services/shellchat/Cargo.toml | 6 +- tools/Cargo.toml | 2 +- xtask/Cargo.toml | 2 +- 11 files changed, 113 insertions(+), 75 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a6b4fa249..06e41912d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1118,7 +1118,7 @@ dependencies = [ "sha2 0.10.8", "subtle", "trng", - "untrusted", + "untrusted 0.7.1", "xous-api-names", ] @@ -1150,13 +1150,13 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "curve25519-dalek" version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", - "engine-25519", - "engine25519-as", "fiat-crypto 0.2.6", "platforms", "rustc_version 0.4.0", @@ -1167,6 +1167,8 @@ dependencies = [ [[package]] name = "curve25519-dalek-derive" version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", @@ -2345,6 +2347,29 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "hoot" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df22a4d90f1b0e65fe3e0d6ee6a4608cc4d81f4b2eb3e670f44bb6bde711e452" +dependencies = [ + "httparse", + "log", +] + +[[package]] +name = "hootbin" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "354e60868e49ea1a39c44b9562ad207c4259dc6eabf9863bf3b0f058c55cfdb2" +dependencies = [ + "fastrand", + "hoot", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "http" version = "0.2.11" @@ -2408,9 +2433,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4128,16 +4153,31 @@ dependencies = [ [[package]] name = "ring" version = "0.16.20" -source = "git+https://github.com/betrusted-io/ring-xous?rev=4296c2e7904898766cf7d8d589759a129794783b#4296c2e7904898766cf7d8d589759a129794783b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", "libc", - "log", "once_cell", - "rkyv", "spin 0.5.2", - "untrusted", + "untrusted 0.7.1", + "web-sys", "winapi", +] + +[[package]] +name = "ring" +version = "0.17.7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.12", + "libc", + "log", + "rkyv", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", "xous 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-names", "xous-ipc 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4265,34 +4305,33 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.7" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ "log", - "ring", - "rustls-webpki 0.101.4", - "sct", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", ] [[package]] -name = "rustls-webpki" -version = "0.100.3" +name = "rustls-pki-types" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" -dependencies = [ - "ring", - "untrusted", -] +checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.102.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", ] [[package]] @@ -4334,8 +4373,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -4589,7 +4628,7 @@ dependencies = [ "rand_chacha 0.3.1", "rand_xorshift", "random-pick", - "ring", + "ring 0.17.7", "rkyv", "root-keys", "sha2 0.10.8", @@ -5083,11 +5122,11 @@ dependencies = [ "pddb", "rkyv", "rustls", - "rustls-webpki 0.101.4", + "rustls-webpki", "sct", "sha2 0.10.8", "ureq", - "webpki-roots 0.24.0", + "webpki-roots", "x509-parser", "xous 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)", "xous-api-log", @@ -5125,7 +5164,7 @@ dependencies = [ "log", "pem", "pkcs8 0.8.0", - "ring", + "ring 0.17.7", "sha2 0.10.8", "svd2utra 0.1.22", "xmas-elf", @@ -5338,28 +5377,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] -name = "ureq" -version = "2.7.1" +name = "untrusted" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "ureq" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "399dd89e2af196ae4f83a47bb37a1455e664fe2fed97b3ae68a1c4a3f8216e76" dependencies = [ "base64 0.21.7", "flate2", + "hootbin", "log", "once_cell", "rustls", - "rustls-webpki 0.100.3", + "rustls-pki-types", + "rustls-webpki", "serde", "serde_json", "url", - "webpki-roots 0.23.1", + "webpki-roots", ] [[package]] name = "url" -version = "2.5.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", @@ -5889,20 +5936,11 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.23.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +checksum = "0de2cfda980f21be5a7ed2eadb3e6fe074d56022bea2cdeb1a62eb220fc04188" dependencies = [ - "rustls-webpki 0.100.3", -] - -[[package]] -name = "webpki-roots" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" -dependencies = [ - "rustls-webpki 0.101.4", + "rustls-pki-types", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index aa1564843..1f380da17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -164,9 +164,9 @@ branch = "main" path = "imports/getrandom" [patch.crates-io.ring] -# path = "../ring-xous" # for local dev only -git = "https://github.com/betrusted-io/ring-xous" -rev = "4296c2e7904898766cf7d8d589759a129794783b" # use the commitref because we're still updating the branch +path = "../ring-xous" # for local dev only +#git = "https://github.com/betrusted-io/ring-xous" +#rev = "4296c2e7904898766cf7d8d589759a129794783b" # use the commitref because we're still updating the branch #branch="0.16.20-cleanup" ###################################################### diff --git a/apps/app-loader/Cargo.toml b/apps/app-loader/Cargo.toml index be322d30b..352fe568d 100644 --- a/apps/app-loader/Cargo.toml +++ b/apps/app-loader/Cargo.toml @@ -25,5 +25,5 @@ rkyv = { version = "0.4.3", features = [ "const_generics", ], default-features = false } -ureq = { version = "2.5.0", features = ["json"] } -url = "2.4" +ureq = { version = "2.9.4", features = ["json"] } +url = "2.3.1" diff --git a/apps/chat-test/Cargo.toml b/apps/chat-test/Cargo.toml index ea2c9e8e4..e74c1078e 100644 --- a/apps/chat-test/Cargo.toml +++ b/apps/chat-test/Cargo.toml @@ -38,8 +38,8 @@ rkyv = { version = "0.4.3", default-features = false, features = [ ] } serde = { version = "1.0", features = ["derive"] } tls = { path = "../../libs/tls" } -ureq = { version = "2.7.1", features = ["json"] } -url = "2.2.2" +ureq = { version = "2.9.4", features = ["json"] } +url = "2.3.1" [features] default = [] diff --git a/apps/mtxchat/Cargo.toml b/apps/mtxchat/Cargo.toml index f60041266..02a381131 100644 --- a/apps/mtxchat/Cargo.toml +++ b/apps/mtxchat/Cargo.toml @@ -37,8 +37,8 @@ rkyv = { version = "0.4.3", default-features = false, features = [ ] } serde = { version = "1.0", features = ["derive"] } tls = { path = "../../libs/tls" } -ureq = { version = "2.7.1", features = ["json"] } -url = "2.2.2" +ureq = { version = "2.9.4", features = ["json"] } +url = "2.3.1" [features] default = [] diff --git a/apps/mtxcli/Cargo.toml b/apps/mtxcli/Cargo.toml index e858989a5..e106e722d 100644 --- a/apps/mtxcli/Cargo.toml +++ b/apps/mtxcli/Cargo.toml @@ -31,7 +31,7 @@ pddb = { path = "../../services/pddb" } # new dependencies for mtxcli percent-encoding = "2.2" serde = { version = "1.0", features = ["derive"] } -ureq = { version = "2.5", features = ["json"] } +ureq = { version = "2.9.4", features = ["json"] } [features] default = [] diff --git a/apps/vault/tools/vaultbackup-rs/Cargo.toml b/apps/vault/tools/vaultbackup-rs/Cargo.toml index 0b1d78604..8415529be 100644 --- a/apps/vault/tools/vaultbackup-rs/Cargo.toml +++ b/apps/vault/tools/vaultbackup-rs/Cargo.toml @@ -8,18 +8,18 @@ edition = "2021" [dependencies] argh = "0.1.8" ctaphid = "0.1.1" -cbor = {path = "../../libraries/cbor"} -backup = {path = "../../libraries/backup"} -hidapi = {version = "1.4.1", default_features = false} +cbor = { path = "../../libraries/cbor" } +backup = { path = "../../libraries/backup" } +hidapi = { version = "1.4.1", default_features = false } serde_json = "1.0.82" -serde = {version = "1.0.138", features = ["derive"]} +serde = { version = "1.0.138", features = ["derive"] } hex = "0.4.3" clap = { version = "3.2.12", features = ["derive"] } anyhow = "1.0.58" log = "0.4.17" env_logger = "0.9.0" serde_repr = "0.1.9" -url = "2.2.2" +url = "2.3.1" base64 = "0.5.2" base32 = "0.4.0" protobuf = "3.1.0" diff --git a/libs/tls/Cargo.toml b/libs/tls/Cargo.toml index 31d55de10..f86ae9247 100644 --- a/libs/tls/Cargo.toml +++ b/libs/tls/Cargo.toml @@ -25,11 +25,11 @@ rkyv = "0.4.3" sha2 = { version = "0.10.8" } # note requirement for patch to xous-ring in workspace Cargo.toml -rustls = { version = "=0.21.7", features = ["dangerous_configuration"] } -ureq = "=2.7.1" -webpki = { package = "rustls-webpki", version = "=0.101.4" } -sct = { version = "=0.7.0"} -webpki-roots = { version = "=0.24.0", optional = true } +rustls = { version = "=0.22.2" } +ureq = "2.9.4" +webpki = { package = "rustls-webpki", version = "=0.102.1" } +sct = { version = "=0.7.0" } +webpki-roots = { version = "=0.26.0", optional = true } x509-parser = "0.15.0" [features] diff --git a/services/shellchat/Cargo.toml b/services/shellchat/Cargo.toml index 6210ec9c9..676923d49 100644 --- a/services/shellchat/Cargo.toml +++ b/services/shellchat/Cargo.toml @@ -80,10 +80,10 @@ tracing-subscriber = { version = "0.3.11", optional = true } # for rustls testing tls = { path = "../../libs/tls", optional = true } -url = { version = "2.2.2", optional = true } +url = { version = "2.3.1", optional = true } # for testing ring math functions # note requirement for patch to xous-ring in workspace Cargo.toml -ring = { version = "=0.16.20", optional = true } +ring = { version = "=0.17.7", optional = true } # for websocket testing tungstenite = { version = "0.20.0", optional = true } @@ -97,7 +97,7 @@ random-pick = { version = "1.2.16", optional = true } hex = { version = "0.4.3", default-features = false, features = [] } #sha2 = {version = "0.9.5", default-features = false, features = []} [dependencies.curve25519-dalek] -version = "=4.1.1" # note this is patched to our fork in ./Cargo.toml +version = "=4.1.1" # note this is patched to our fork in ./Cargo.toml default-features = false [dependencies.x25519-dalek] diff --git a/tools/Cargo.toml b/tools/Cargo.toml index 4dec72eeb..31ec6d331 100644 --- a/tools/Cargo.toml +++ b/tools/Cargo.toml @@ -13,7 +13,7 @@ bitflags = "1.2.1" clap = "2.33.3" crc = "1.8.1" csv = "1.1.5" -ring = "0.16.20" +ring = "0.17.7" env_logger = "0.7.1" log = "0.4.14" pem = "0.8.3" diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 8854c6643..cfa3dd75c 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -16,7 +16,7 @@ chrono = "0.4.33" serde_json = "1.0.41" serde = { version = "1.0.130", features = ["derive"] } tempfile = "3.3.0" -ureq = { version = "2.5.0", features = ["json"] } +ureq = { version = "2.9.0", features = ["json"] } svd2utra = "0.1.22" lazy_static = "1.4.0" # toml_edit = "0.14.4" # would be used to verify Cargo.toml files, but it's too hard to do this right now.