diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 132132f0a..334224f56 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -39,14 +39,13 @@ dependencies = [ [[package]] name = "aes" -version = "0.7.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher", "cpufeatures", - "opaque-debug", ] [[package]] @@ -189,12 +188,14 @@ checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" [[package]] name = "async-broadcast" -version = "0.5.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ - "event-listener 2.5.3", + "event-listener 5.2.0", + "event-listener-strategy 0.5.1", "futures-core", + "pin-project-lite", ] [[package]] @@ -219,41 +220,20 @@ dependencies = [ "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.2", - "futures-lite 2.3.0", + "fastrand", + "futures-lite", "slab", ] [[package]] name = "async-fs" -version = "1.6.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ - "async-lock 2.8.0", - "autocfg", + "async-lock 3.3.0", "blocking", - "futures-lite 1.13.0", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", + "futures-lite", ] [[package]] @@ -266,10 +246,10 @@ dependencies = [ "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "parking", - "polling 3.6.0", - "rustix 0.38.32", + "polling", + "rustix", "slab", "tracing", "windows-sys 0.52.0", @@ -297,19 +277,22 @@ dependencies = [ [[package]] name = "async-process" -version = "1.8.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel", + "async-io", + "async-lock 3.3.0", "async-signal", + "async-task", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.32", - "windows-sys 0.48.0", + "event-listener 5.2.0", + "futures-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", ] [[package]] @@ -329,13 +312,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.3.2", + "async-io", "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.32", + "rustix", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -416,7 +399,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7b2dbe9169059af0f821e811180fddc971fc210c776c133c7819ccd6e478db" dependencies = [ - "rustix 0.38.32", + "rustix", "tempfile", "windows-sys 0.52.0", ] @@ -631,21 +614,14 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-modes" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb03d1bed155d89dce0f845b7899b18a9a163e148fd004e1c28421a783e2d8e" -dependencies = [ - "block-padding", - "cipher 0.3.0", -] - [[package]] name = "block-padding" -version = "0.2.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] [[package]] name = "block2" @@ -665,9 +641,9 @@ dependencies = [ "async-channel", "async-lock 3.3.0", "async-task", - "fastrand 2.0.2", + "fastrand", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "piper", "tracing", ] @@ -814,6 +790,15 @@ dependencies = [ "toml 0.7.8", ] +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + [[package]] name = "cc" version = "1.0.90" @@ -875,7 +860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.4.4", + "cipher", "cpufeatures", ] @@ -887,7 +872,7 @@ checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ "aead", "chacha20", - "cipher 0.4.4", + "cipher", "poly1305", "zeroize", ] @@ -905,15 +890,6 @@ dependencies = [ "windows-targets 0.52.5", ] -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - [[package]] name = "cipher" version = "0.4.4" @@ -1429,6 +1405,35 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +[[package]] +name = "dbus" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" +dependencies = [ + "libc", + "libdbus-sys", + "winapi", +] + +[[package]] +name = "dbus-secret-service" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3ae92ba157c1fd7e3453bf8fad9cd2e62783fe5f65047fd3b52fcbf6594aef" +dependencies = [ + "aes", + "block-padding", + "cbc", + "dbus", + "futures-util", + "hkdf", + "num", + "once_cell", + "rand 0.8.5", + "sha2", +] + [[package]] name = "debugid" version = "0.8.0" @@ -1567,7 +1572,7 @@ checksum = "e5766087c2235fec47fafa4cfecc81e494ee679d0fd4a59887ea0919bfb0e4fc" dependencies = [ "cfg-if", "libc", - "socket2 0.5.7", + "socket2", "windows-sys 0.48.0", ] @@ -1641,6 +1646,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + [[package]] name = "enum-as-inner" version = "0.6.0" @@ -1725,17 +1736,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "4.0.3" @@ -1778,15 +1778,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.2" @@ -2013,7 +2004,7 @@ dependencies = [ "serde", "sha2", "socket-factory", - "socket2 0.5.7", + "socket2", "stun_codec", "test-strategy", "tokio", @@ -2064,7 +2055,7 @@ dependencies = [ "serde_json", "snownet", "socket-factory", - "socket2 0.5.7", + "socket2", "test-strategy", "thiserror", "tokio", @@ -2210,28 +2201,13 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-lite" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.2", + "fastrand", "futures-core", "futures-io", "parking", @@ -2519,7 +2495,7 @@ checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" dependencies = [ "anyhow", "heck 0.4.1", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -2625,7 +2601,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" dependencies = [ "anyhow", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -2935,7 +2911,7 @@ dependencies = [ "httpdate", "itoa 1.0.11", "pin-project-lite", - "socket2 0.5.7", + "socket2", "tokio", "tower-service", "tracing", @@ -3004,7 +2980,7 @@ dependencies = [ "http-body 1.0.0", "hyper 1.2.0", "pin-project-lite", - "socket2 0.5.7", + "socket2", "tokio", "tower", "tower-service", @@ -3134,6 +3110,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ + "block-padding", "generic-array", ] @@ -3146,17 +3123,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ip-packet" version = "0.1.0" @@ -3201,7 +3167,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.7", + "socket2", "widestring", "windows-sys 0.48.0", "winreg 0.50.0", @@ -3337,15 +3303,13 @@ dependencies = [ [[package]] name = "keyring" -version = "2.3.3" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363387f0019d714aa60cc30ab4fe501a747f4c08fc58f069dd14be971bd495a0" +checksum = "9961b98f55dc0b2737000132505bdafa249abab147ee9de43c50ae04a054aa6c" dependencies = [ "byteorder", - "lazy_static", - "linux-keyutils", + "dbus-secret-service", "secret-service", - "security-framework", "windows-sys 0.52.0", ] @@ -3407,6 +3371,15 @@ version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +[[package]] +name = "libdbus-sys" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" +dependencies = [ + "pkg-config", +] + [[package]] name = "libloading" version = "0.7.4" @@ -3455,22 +3428,6 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" -[[package]] -name = "linux-keyutils" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761e49ec5fd8a5a463f9b84e877c373d888935b71c6be78f3767fe2ae6bed18e" -dependencies = [ - "bitflags 2.5.0", - "libc", -] - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -3703,7 +3660,7 @@ dependencies = [ "log", "minidump-writer", "parking_lot", - "polling 3.6.0", + "polling", "scroll", "thiserror", "uds", @@ -3937,14 +3894,14 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.10.0" +version = "4.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827c5edfa80235ded4ab3fe8e9dc619b4f866ef16fe9b1c6b8a7f8692c0f2226" +checksum = "5312f837191c317644f313f7b2b39f9cb1496570c74f7c17152dd3961219551f" dependencies = [ "log", "mac-notification-sys", "serde", - "tauri-winrt-notification 0.1.3", + "tauri-winrt-notification 0.2.1", "zbus", ] @@ -3960,9 +3917,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" dependencies = [ "num-bigint", "num-complex", @@ -3974,20 +3931,19 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -4020,9 +3976,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -4031,11 +3987,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -4076,7 +4031,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -4619,7 +4574,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.2", + "fastrand", "futures-io", ] @@ -4644,7 +4599,7 @@ dependencies = [ "base64 0.21.7", "indexmap 2.2.6", "line-wrap", - "quick-xml 0.31.0", + "quick-xml", "serde", "time", ] @@ -4704,22 +4659,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - [[package]] name = "polling" version = "3.6.0" @@ -4730,7 +4669,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 0.38.32", + "rustix", "tracing", "windows-sys 0.52.0", ] @@ -4774,6 +4713,15 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -4879,15 +4827,6 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-xml" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" -dependencies = [ - "memchr", -] - [[package]] name = "quick-xml" version = "0.31.0" @@ -4904,7 +4843,7 @@ source = "git+https://github.com/quinn-rs/quinn?branch=main#3f489e2eab014ddd04de dependencies = [ "libc", "once_cell", - "socket2 0.5.7", + "socket2", "tracing", "windows-sys 0.52.0", ] @@ -5044,7 +4983,7 @@ dependencies = [ "pin-project-lite", "ryu", "sha1_smol", - "socket2 0.5.7", + "socket2", "tokio", "tokio-util", "url", @@ -5262,20 +5201,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - [[package]] name = "rustix" version = "0.38.32" @@ -5285,7 +5210,7 @@ dependencies = [ "bitflags 2.5.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -5438,12 +5363,12 @@ dependencies = [ [[package]] name = "secret-service" -version = "3.0.1" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da1a5ad4d28c03536f82f77d9f36603f5e37d8869ac98f0a750d5b5686d8d95" +checksum = "e4d35ad99a181be0a60ffcbe85d680d98f87bdc4d7644ade319b87076b9dbfd4" dependencies = [ "aes", - "block-modes", + "cbc", "futures-util", "generic-array", "hkdf", @@ -5455,29 +5380,6 @@ dependencies = [ "zbus", ] -[[package]] -name = "security-framework" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "selectors" version = "0.22.0" @@ -5816,20 +5718,10 @@ dependencies = [ name = "socket-factory" version = "0.1.0" dependencies = [ - "socket2 0.5.7", + "socket2", "tokio", ] -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.7" @@ -5902,7 +5794,7 @@ source = "git+https://github.com/firezone/str0m?branch=main#b59f9eb58a5a5b506e12 dependencies = [ "combine", "crc", - "fastrand 2.0.2", + "fastrand", "hmac", "once_cell", "sctp-proto", @@ -6198,9 +6090,9 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "1.6.7" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c7177b6be45bbb875aa239578f5adc982a1b3d5ea5b315ccd100aeb0043374" +checksum = "336bc661a3f3250853fa83c6e5245449ed1c26dce5dcb28bdee7efedf6278806" dependencies = [ "anyhow", "cocoa 0.24.1", @@ -6271,9 +6163,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "1.4.3" +version = "1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a1d90db526a8cdfd54444ad3f34d8d4d58fa5c536463915942393743bd06f8" +checksum = "c1aed706708ff1200ec12de9cfbf2582b5d8ec05f6a7293911091effbd22036b" dependencies = [ "base64 0.21.7", "brotli", @@ -6297,9 +6189,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "1.4.4" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a582d75414250122e4a597b9dd7d3c910a2c77906648fc2ac9353845ff0feec" +checksum = "b88f831d2973ae4f81a706a0004e67dac87f2e4439973bbe98efbd73825d8ede" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -6311,9 +6203,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7ffddf36d450791018e63a3ddf54979b9581d9644c584a5fb5611e6b5f20b4" +checksum = "3068ed62b63dedc705558f4248c7ecbd5561f0f8050949859ea0db2326f26012" dependencies = [ "gtk", "http 0.2.12", @@ -6332,9 +6224,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.14.8" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1989b3b4d611f5428b3414a4abae6fa6df30c7eb8ed33250ca90a5f7e5bb3655" +checksum = "d4c3db170233096aa30330feadcd895bf9317be97e624458560a20e814db7955" dependencies = [ "cocoa 0.24.1", "gtk", @@ -6392,12 +6284,13 @@ dependencies = [ [[package]] name = "tauri-winrt-notification" -version = "0.1.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006851c9ccefa3c38a7646b8cec804bb429def3da10497bfa977179869c3e8e2" +checksum = "f89f5fb70d6f62381f5d9b2ba9008196150b40b75f3068eb24faeddf1c686871" dependencies = [ - "quick-xml 0.30.0", - "windows 0.51.1", + "quick-xml", + "windows 0.56.0", + "windows-version", ] [[package]] @@ -6406,7 +6299,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6a48a4bd95615e18e3ff58f76dc0d4a3c0683d2b590e667995ff9bbaff1f17" dependencies = [ - "quick-xml 0.31.0", + "quick-xml", "thiserror", "windows 0.57.0", "windows-version", @@ -6419,8 +6312,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.2", - "rustix 0.38.32", + "fastrand", + "rustix", "windows-sys 0.52.0", ] @@ -6543,7 +6436,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.7", + "socket2", "tokio-macros", "windows-sys 0.48.0", ] @@ -6675,6 +6568,17 @@ dependencies = [ "winnow 0.5.40", ] +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + [[package]] name = "toml_edit" version = "0.22.9" @@ -7123,12 +7027,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "walkdir" version = "2.5.0" @@ -7372,7 +7270,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.32", + "rustix", ] [[package]] @@ -7448,16 +7346,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" -dependencies = [ - "windows-core 0.51.1", - "windows-targets 0.48.5", -] - [[package]] name = "windows" version = "0.52.0" @@ -7468,6 +7356,16 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "windows" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +dependencies = [ + "windows-core 0.56.0", + "windows-targets 0.52.5", +] + [[package]] name = "windows" version = "0.57.0" @@ -7488,15 +7386,6 @@ dependencies = [ "windows-tokens", ] -[[package]] -name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-core" version = "0.52.0" @@ -7506,6 +7395,18 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "windows-core" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +dependencies = [ + "windows-implement 0.56.0", + "windows-interface 0.56.0", + "windows-result", + "windows-targets 0.52.5", +] + [[package]] name = "windows-core" version = "0.57.0" @@ -7513,7 +7414,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ "windows-implement 0.57.0", - "windows-interface", + "windows-interface 0.57.0", "windows-result", "windows-targets 0.52.5", ] @@ -7528,6 +7429,17 @@ dependencies = [ "windows-tokens", ] +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.57", +] + [[package]] name = "windows-implement" version = "0.57.0" @@ -7539,6 +7451,17 @@ dependencies = [ "syn 2.0.57", ] +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.57", +] + [[package]] name = "windows-interface" version = "0.57.0" @@ -8031,7 +7954,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" dependencies = [ "gethostname", - "rustix 0.38.32", + "rustix", "x11rb-protocol", ] @@ -8060,8 +7983,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "linux-raw-sys 0.4.13", - "rustix 0.38.32", + "linux-raw-sys", + "rustix", ] [[package]] @@ -8076,30 +7999,28 @@ dependencies = [ [[package]] name = "zbus" -version = "3.15.2" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" +checksum = "c9ff46f2a25abd690ed072054733e0bc3157e3d4c45f41bd183dce09c2ff8ab9" dependencies = [ "async-broadcast", "async-executor", "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io", + "async-lock 3.3.0", "async-process", "async-recursion", "async-task", "async-trait", "blocking", - "byteorder", "derivative", "enumflags2", - "event-listener 2.5.3", + "event-listener 5.2.0", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.26.4", - "once_cell", + "nix 0.28.0", "ordered-stream", "rand 0.8.5", "serde", @@ -8108,7 +8029,7 @@ dependencies = [ "static_assertions", "tracing", "uds_windows", - "winapi", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -8117,11 +8038,11 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.15.2" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" +checksum = "4e0e3852c93dcdb49c9462afe67a2a468f7bd464150d866e861eaf06208633e0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "regex", @@ -8131,9 +8052,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.6.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", @@ -8194,13 +8115,12 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.2" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" +checksum = "2c1b3ca6db667bfada0f1ebfc94b2b1759ba25472ee5373d4551bb892616389a" dependencies = [ - "byteorder", + "endi", "enumflags2", - "libc", "serde", "static_assertions", "zvariant_derive", @@ -8208,11 +8128,11 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.15.2" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" +checksum = "b7a4b236063316163b69039f77ce3117accb41a09567fd24c168e43491e521bc" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -8221,9 +8141,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" dependencies = [ "proc-macro2", "quote", diff --git a/rust/gui-client/src-tauri/Cargo.toml b/rust/gui-client/src-tauri/Cargo.toml index 65efc9f4e..142605d29 100644 --- a/rust/gui-client/src-tauri/Cargo.toml +++ b/rust/gui-client/src-tauri/Cargo.toml @@ -24,7 +24,6 @@ firezone-headless-client = { path = "../../headless-client" } futures = { version = "0.3", default-features = false } git-version = "0.3.9" hex = "0.4.3" -keyring = "2.3.3" minidumper = "0.8.2" native-dialog = "0.7.0" output_vt100 = "0.1" @@ -36,7 +35,7 @@ semver = { version = "1.0.22", features = ["serde"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" subtle = "2.5.0" -tauri = { version = "1.6.7", features = [ "dialog", "icon-png", "notification", "shell-open-api", "system-tray" ] } +tauri = { version = "1.7.1", features = [ "dialog", "icon-png", "notification", "shell-open-api", "system-tray" ] } tauri-runtime = "0.14.2" tauri-utils = "1.6.0" thiserror = { version = "1.0", default-features = false } @@ -51,6 +50,14 @@ url = { version = "2.5.0", features = ["serde"] } uuid = { version = "1.7.0", features = ["v4"] } zip = { version = "2", features = ["deflate", "time"], default-features = false } +[dependencies.keyring] +version = "3.0.3" +features = [ + "crypto-rust", # Don't rely on OpenSSL + "sync-secret-service", # Can't use Tokio because of + "windows-native", # Yes, really, we must actually explicitly ask for every platform. Otherwise it defaults to an in-memory mock store. Really. That's really how `keyring` 3.x is designed. +] + [target.'cfg(target_os = "linux")'.dependencies] dirs = "5.0.1" nix = { version = "0.28.0", features = ["user"] } diff --git a/rust/gui-client/src-tauri/src/client/auth.rs b/rust/gui-client/src-tauri/src/client/auth.rs index d4d94ee8a..9ef923a2d 100644 --- a/rust/gui-client/src-tauri/src/client/auth.rs +++ b/rust/gui-client/src-tauri/src/client/auth.rs @@ -122,7 +122,7 @@ impl Auth { /// /// Performs I/O. pub fn sign_out(&mut self) -> Result<(), Error> { - if let Err(error) = self.token_store.delete_password() { + if let Err(error) = self.token_store.delete_credential() { tracing::warn!(?error, "Couldn't delete token while signing out"); } if let Err(error) = std::fs::remove_file(actor_name_path()?) { @@ -259,39 +259,58 @@ fn secure_equality(a: &SecretString, b: &SecretString) -> bool { a.ct_eq(b).into() } -// The Linux CI is headless so it's hard to test keyrings in it -// There is a trick, but it requires some setup outside of `cargo test`: -// -#[cfg(not(target_os = "linux"))] #[cfg(test)] mod tests { use super::*; + #[cfg(not(target_os = "linux"))] fn bogus_secret(x: &str) -> SecretString { SecretString::new(x.into()) } #[test] - fn actor_name_path() { - assert!(super::actor_name_path() + fn actor_name() { + assert!(actor_name_path() .expect("`actor_name_path` should return Ok") .components() .any(|x| x == std::path::Component::Normal("dev.firezone.client".as_ref()))); } + #[test] + #[cfg(target_os = "linux")] + fn keyring_is_persistent() { + assert!(matches!( + keyring::secret_service::default_credential_builder().persistence(), + keyring::credential::CredentialPersistence::UntilDelete + )); + } + + #[test] + #[cfg(target_os = "windows")] + fn keyring_is_persistent() { + assert!(matches!( + keyring::windows::default_credential_builder().persistence(), + keyring::credential::CredentialPersistence::UntilDelete + )); + } + /// Runs everything in one test so that `cargo test` can't multi-thread it /// This should work around a bug we had #[test] + // The Linux CI is headless so it's hard to test keyrings in it + #[cfg(not(target_os = "linux"))] fn everything() { // Run `happy_path` first to make sure it reacts okay if our `data` dir is missing // TODO: Re-enable happy path tests once `keyring-rs` is working in CI tests - // happy_path(""); - // happy_path("Jane Doe"); + happy_path(""); + happy_path("Jane Doe"); utils(); no_inflight_request(); states_dont_match(); } + // The Linux CI is headless so it's hard to test keyrings in it + #[cfg(not(target_os = "linux"))] #[test] fn keyring_rs() { // We used this test to find that `service` is not used on Windows - We have to namespace on our own. @@ -299,25 +318,34 @@ mod tests { let name_1 = "dev.firezone.client/test_1/token"; let name_2 = "dev.firezone.client/test_2/token"; - // Accessing the same keys from different `Entry` instances doesn't work well, - // even within the same thread + let test_password_1 = "test_password_1"; + let test_password_2 = "test_password_2"; + let entry = keyring::Entry::new_with_target(name_1, "", "").unwrap(); entry.set_password("test_password_1").unwrap(); { // In the middle of accessing one token, access another to make sure they don't interfere much let entry = keyring::Entry::new_with_target(name_2, "", "").unwrap(); - entry.set_password("test_password_2").unwrap(); - assert_eq!(entry.get_password().unwrap(), "test_password_2"); - entry.delete_password().unwrap(); + entry.set_password(test_password_2).unwrap(); + assert_eq!(entry.get_password().unwrap(), test_password_2); + } + + { + // Make sure that closing and re-opening the `Entry` on the same thread + // gives the correct result + let entry = keyring::Entry::new_with_target(name_2, "", "").unwrap(); + assert_eq!(entry.get_password().unwrap(), test_password_2); + entry.delete_credential().unwrap(); assert!(entry.get_password().is_err()); } - assert_eq!(entry.get_password().unwrap(), "test_password_1"); - entry.delete_password().unwrap(); + assert_eq!(entry.get_password().unwrap(), test_password_1); + entry.delete_credential().unwrap(); assert!(entry.get_password().is_err()); } + #[cfg(not(target_os = "linux"))] fn utils() { // This doesn't test for constant-time properties, it just makes sure the function // gives the right result @@ -342,8 +370,8 @@ mod tests { ); } - // TODO: Re-enable - fn _happy_path(actor_name: &str) { + #[cfg(not(target_os = "linux"))] + fn happy_path(actor_name: &str) { // Key for credential manager. This is not what we use in production let key = "dev.firezone.client/test_DMRCZ67A_happy_path/token"; @@ -392,6 +420,7 @@ mod tests { } } + #[cfg(not(target_os = "linux"))] fn no_inflight_request() { // Start the program let mut state = @@ -417,6 +446,7 @@ mod tests { state.sign_out().unwrap(); } + #[cfg(not(target_os = "linux"))] fn states_dont_match() { // Start the program let mut state = diff --git a/rust/gui-client/src-tauri/src/client/debug_commands.rs b/rust/gui-client/src-tauri/src/client/debug_commands.rs index c94a37906..24ac32653 100644 --- a/rust/gui-client/src-tauri/src/client/debug_commands.rs +++ b/rust/gui-client/src-tauri/src/client/debug_commands.rs @@ -6,6 +6,11 @@ use anyhow::Result; #[derive(clap::Subcommand)] pub(crate) enum Cmd { SetAutostart(SetAutostartArgs), + + // Store and check a bogus debug token to make sure `keyring-rs` + // is behaving. + CheckToken(CheckTokenArgs), + StoreToken(StoreTokenArgs), } #[derive(clap::Parser)] @@ -14,9 +19,33 @@ pub(crate) struct SetAutostartArgs { enabled: bool, } +#[derive(clap::Parser)] +pub(crate) struct CheckTokenArgs { + token: String, +} + +#[derive(clap::Parser)] +pub(crate) struct StoreTokenArgs { + token: String, +} + +const CRED_NAME: &str = "dev.firezone.client/test_BYKPFT6P/token"; + pub fn run(cmd: Cmd) -> Result<()> { match cmd { Cmd::SetAutostart(SetAutostartArgs { enabled }) => set_autostart(enabled), + + Cmd::CheckToken(CheckTokenArgs { token: expected }) => { + assert_eq!( + keyring::Entry::new_with_target(CRED_NAME, "", "")?.get_password()?, + expected + ); + Ok(()) + } + Cmd::StoreToken(StoreTokenArgs { token }) => { + keyring::Entry::new_with_target(CRED_NAME, "", "")?.set_password(&token)?; + Ok(()) + } } }