From d2e0f8ca8ea30e840687f1b87e7124e1e25e1995 Mon Sep 17 00:00:00 2001 From: Przemko Robakowski Date: Thu, 23 Jan 2025 23:41:39 +0100 Subject: [PATCH 1/8] Add support for storing RDP licenses from Windows Desktops Co-authored-by: Alan Parra Signed-off-by: Zac Bergquist --- .github/workflows/dependency-review.yaml | 18 + Cargo.lock | 1531 ++++++++++++----- Cargo.toml | 27 +- api/types/desktop.go | 8 + lib/auth/storage/storage.go | 38 + lib/auth/storage/storage_test.go | 72 + lib/service/desktop.go | 1 + lib/srv/desktop/rdp/rdpclient/client.go | 116 ++ .../desktop/rdp/rdpclient/client_common.go | 12 + lib/srv/desktop/rdp/rdpclient/src/client.rs | 8 +- lib/srv/desktop/rdp/rdpclient/src/lib.rs | 25 + lib/srv/desktop/rdp/rdpclient/src/license.rs | 85 + lib/srv/desktop/windows_server.go | 9 +- 13 files changed, 1535 insertions(+), 415 deletions(-) create mode 100644 lib/auth/storage/storage_test.go create mode 100644 lib/srv/desktop/rdp/rdpclient/src/license.rs diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml index 34f9e6d9ce6ed..24260fa4e9336 100644 --- a/.github/workflows/dependency-review.yaml +++ b/.github/workflows/dependency-review.yaml @@ -17,6 +17,24 @@ jobs: # Teleport version. allow-ghsas: 'GHSA-xwh9-gc39-5298,GHSA-6xf3-5hp7-xqqg' allow-dependencies-licenses: >- + pkg:cargo/ironrdp-cliprdr, + pkg:cargo/ironrdp-core, + pkg:cargo/ironrdp-async, + pkg:cargo/ironrdp-connector, + pkg:cargo/ironrdp-displaycontrol, + pkg:cargo/ironrdp-dvc, + pkg:cargo/ironrdp-error, + pkg:cargo/ironrdp-graphics, + pkg:cargo/ironrdp-pdu, + pkg:cargo/ironrdp-rdpdr, + pkg:cargo/ironrdp-rdpsnd, + pkg:cargo/ironrdp-session, + pkg:cargo/ironrdp-svc, + pkg:cargo/ironrdp-tokio, + pkg:cargo/ironrdp-tls, + pkg:cargo/asn1-rs, + pkg:cargo/asn1-rs-derive, + pkg:cargo/asn1-rs-impl, pkg:cargo/curve25519-dalek-derive, pkg:cargo/ring, pkg:cargo/sspi, diff --git a/Cargo.lock b/Cargo.lock index 7dfdc2015edc0..a55b85a805152 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,28 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] [[package]] name = "aes" @@ -28,6 +38,29 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "aes-kw" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69fa2b352dcefb5f7f3a5fb840e02665d311d878955380515e4fd50095dd3d8c" +dependencies = [ + "aes", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -39,9 +72,9 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -54,13 +87,13 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", "synstructure", ] @@ -72,14 +105,14 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "async-dnssd" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98efc05996cc8d660e88841fcffb75aa71be5339c9ae559a8c8016c048420b82" +checksum = "3d49ffe175ab45bbfd74b548313d9d7cdfff27161a94b007b52eeeb5f9aaa15e" dependencies = [ "bitflags 1.3.2", "futures-channel", @@ -102,7 +135,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -127,23 +160,48 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "aws-lc-rs" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "4c2b7ddaa2c56a367ad27a094ad8ef4faacf8a617c2575acb2ba88949df999ca" +dependencies = [ + "aws-lc-sys", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71b2ddd3ada61a305e1d8bb6c005d1eaa7d14d903681edfc400406d523a9b491" +dependencies = [ + "bindgen 0.69.5", + "cc", + "cmake", + "dunce", + "fs_extra", + "paste", +] [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -158,6 +216,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64ct" version = "1.6.0" @@ -170,7 +234,7 @@ version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cexpr", "clang-sys", "lazy_static", @@ -181,7 +245,30 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.68", + "syn 2.0.96", +] + +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.8.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.96", + "which", ] [[package]] @@ -198,9 +285,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bitvec" @@ -237,7 +324,7 @@ name = "boring" version = "4.4.0" source = "git+https://github.com/gravitational/boring?rev=605253d99d5e363e178bcf97e1d4622e33844cd5#605253d99d5e363e178bcf97e1d4622e33844cd5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "boring-sys", "foreign-types", "libc", @@ -249,7 +336,7 @@ name = "boring-sys" version = "4.4.0" source = "git+https://github.com/gravitational/boring?rev=605253d99d5e363e178bcf97e1d4622e33844cd5#605253d99d5e363e178bcf97e1d4622e33844cd5" dependencies = [ - "bindgen", + "bindgen 0.68.1", "cmake", "fs_extra", "fslock", @@ -257,9 +344,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" @@ -269,9 +356,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cbc" @@ -303,9 +390,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.102" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779e6b7d17797c0b42023d417228c02889300190e700cb074c3438d9c541d332" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +dependencies = [ + "jobserver", + "libc", + "shlex", +] [[package]] name = "cexpr" @@ -375,9 +467,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.50" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +checksum = "e24a03c8b52922d68a1589ad61032f2c1aa5a8158d2aa0d93c6e9534944bbad6" dependencies = [ "cc", ] @@ -410,24 +502,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "critical-section" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crypto" @@ -457,19 +549,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", + "rand_core", "typenum", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array", "subtle", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -494,7 +596,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -534,13 +636,13 @@ dependencies = [ [[package]] name = "der_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049" +checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -581,9 +683,15 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "ecdsa" version = "0.16.9" @@ -623,6 +731,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + [[package]] name = "elliptic-curve" version = "0.13.8" @@ -646,9 +760,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -674,19 +788,19 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "ff" @@ -706,9 +820,9 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "flagset" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" +checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" [[package]] name = "fnv" @@ -734,7 +848,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -776,9 +890,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -791,9 +905,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -801,15 +915,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -818,38 +932,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -883,21 +997,43 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "group" @@ -921,8 +1057,8 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.2.6", + "http 0.2.12", + "indexmap 2.7.1", "slab", "tokio", "tokio-util", @@ -946,9 +1082,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heapless" @@ -980,9 +1116,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + +[[package]] +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" @@ -1002,6 +1144,15 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "http" version = "0.2.12" @@ -1013,6 +1164,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1020,15 +1182,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.9.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -1044,16 +1206,16 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", @@ -1073,21 +1235,150 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", + "http 0.2.12", "hyper", - "rustls", + "rustls 0.21.12", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", ] [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1102,12 +1393,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] @@ -1131,16 +1422,16 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "ironrdp" version = "0.1.0" dependencies = [ "console_error_panic_hook", - "getrandom", + "getrandom 0.2.15", "ironrdp-graphics", "ironrdp-pdu", "ironrdp-session", @@ -1156,21 +1447,23 @@ dependencies = [ [[package]] name = "ironrdp-async" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.2.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "bytes", "ironrdp-connector", + "ironrdp-core", "ironrdp-pdu", "tracing", ] [[package]] name = "ironrdp-cliprdr" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", + "ironrdp-core", "ironrdp-pdu", "ironrdp-svc", "thiserror", @@ -1179,24 +1472,36 @@ dependencies = [ [[package]] name = "ironrdp-connector" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.2.2" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ + "ironrdp-core", "ironrdp-error", "ironrdp-pdu", "ironrdp-svc", + "picky", + "picky-asn1-der 0.5.2", + "picky-asn1-x509 0.14.3", "rand_core", - "sspi 0.11.1", + "sspi 0.15.0", "tracing", "url", - "winapi", +] + +[[package]] +name = "ironrdp-core" +version = "0.1.2" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" +dependencies = [ + "ironrdp-error", ] [[package]] name = "ironrdp-displaycontrol" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ + "ironrdp-core", "ironrdp-dvc", "ironrdp-pdu", "ironrdp-svc", @@ -1205,9 +1510,10 @@ dependencies = [ [[package]] name = "ironrdp-dvc" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ + "ironrdp-core", "ironrdp-pdu", "ironrdp-svc", "slab", @@ -1216,19 +1522,19 @@ dependencies = [ [[package]] name = "ironrdp-error" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" [[package]] name = "ironrdp-graphics" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "bit_field", - "bitflags 2.6.0", + "bitflags 2.8.0", "bitvec", "byteorder", - "ironrdp-error", + "ironrdp-core", "ironrdp-pdu", "lazy_static", "num-derive", @@ -1238,13 +1544,14 @@ dependencies = [ [[package]] name = "ironrdp-pdu" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.2" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "bit_field", - "bitflags 2.6.0", + "bitflags 2.8.0", "byteorder", "der-parser", + "ironrdp-core", "ironrdp-error", "md-5", "num-bigint", @@ -1260,10 +1567,11 @@ dependencies = [ [[package]] name = "ironrdp-rdpdr" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", + "ironrdp-core", "ironrdp-error", "ironrdp-pdu", "ironrdp-svc", @@ -1272,19 +1580,23 @@ dependencies = [ [[package]] name = "ironrdp-rdpsnd" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ + "bitflags 2.8.0", + "ironrdp-core", "ironrdp-pdu", "ironrdp-svc", + "tracing", ] [[package]] name = "ironrdp-session" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.2.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "ironrdp-connector", + "ironrdp-core", "ironrdp-displaycontrol", "ironrdp-dvc", "ironrdp-error", @@ -1296,27 +1608,28 @@ dependencies = [ [[package]] name = "ironrdp-svc" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.2" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", + "ironrdp-core", "ironrdp-pdu", ] [[package]] name = "ironrdp-tls" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "tokio", - "tokio-rustls", + "tokio-rustls 0.26.1", "x509-cert", ] [[package]] name = "ironrdp-tokio" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.2.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "bytes", "ironrdp-async", @@ -1325,20 +1638,20 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "iso7816" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3af73ac9c821e7aea3280532118e15cdf9e7bb45c923cbf0e319ae25b27d20c" +checksum = "c75f5d3f2d959c5d37b382ed9b5a32d0a0e6112ab6ac9eb8fce82359db6f2367" dependencies = [ "delog", "heapless", @@ -1353,18 +1666,37 @@ dependencies = [ "untrusted", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1394,31 +1726,37 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -1432,9 +1770,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "md-5" @@ -1475,22 +1813,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", - "windows-sys 0.48.0", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", ] [[package]] @@ -1555,7 +1893,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -1588,21 +1926,11 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - [[package]] name = "object" -version = "0.36.1" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -1618,15 +1946,21 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "os_str_bytes" @@ -1664,6 +1998,20 @@ dependencies = [ "sha2", ] +[[package]] +name = "p521" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc9e2161f1f215afdfce23677034ae137bbd45016a880c2eb3ba8eb95f085b2" +dependencies = [ + "base16ct", + "ecdsa", + "elliptic-curve", + "primeorder", + "rand_core", + "sha2", +] + [[package]] name = "parking_lot" version = "0.11.2" @@ -1707,11 +2055,17 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.8", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pbkdf2" version = "0.12.2" @@ -1746,24 +2100,36 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "picky" -version = "7.0.0-rc.8" +version = "7.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52cccdaffd2f361b4b4eb70b4249bd71d89bb66cb84b7f76483ecd1640c543ce" +checksum = "0b11f32016338b5bdb81179ec286a7d466041c27c5d45810da090c08ae451925" dependencies = [ - "base64", + "aes", + "aes-gcm", + "aes-kw", + "base64 0.22.1", + "cbc", + "des", "digest", "ed25519-dalek", + "hex", + "hmac", + "http 1.2.0", "md-5", "num-bigint-dig", "p256", "p384", - "picky-asn1", - "picky-asn1-der", - "picky-asn1-x509", + "p521", + "pbkdf2", + "picky-asn1 0.10.1", + "picky-asn1-der 0.5.2", + "picky-asn1-x509 0.14.3", "rand", "rand_core", + "rc2", "rsa", "serde", + "serde_json", "sha1", "sha2", "sha3", @@ -1777,6 +2143,18 @@ name = "picky-asn1" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "295eea0f33c16be21e2a98b908fdd4d73c04dd48c8480991b76dbcf0cb58b212" +dependencies = [ + "oid", + "serde", + "serde_bytes", + "time", +] + +[[package]] +name = "picky-asn1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ff038f9360b934342fb3c0a1d6e82c438a2624b51c3c6e3e6d7cf252b6f3ee3" dependencies = [ "oid", "serde", @@ -1791,7 +2169,18 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5df7873a9e36d42dadb393bea5e211fe83d793c172afad5fb4ec846ec582793f" dependencies = [ - "picky-asn1", + "picky-asn1 0.8.0", + "serde", + "serde_bytes", +] + +[[package]] +name = "picky-asn1-der" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dccb53c26f70c082e008818f524bd45d057069517b047bd0c0ee062d6d7d7f2" +dependencies = [ + "picky-asn1 0.10.1", "serde", "serde_bytes", ] @@ -1802,11 +2191,25 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c5f20f71a68499ff32310f418a6fad8816eac1a2859ed3f0c5c741389dd6208" dependencies = [ - "base64", + "base64 0.21.7", + "oid", + "picky-asn1 0.8.0", + "picky-asn1-der 0.4.1", + "serde", + "widestring", +] + +[[package]] +name = "picky-asn1-x509" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "511c46b93e7f08571a375882879d3a468dfe8793d73249907b2e3332950cb33e" +dependencies = [ + "base64 0.22.1", "num-bigint-dig", "oid", - "picky-asn1", - "picky-asn1-der", + "picky-asn1 0.10.1", + "picky-asn1-der 0.5.2", "serde", "widestring", "zeroize", @@ -1814,9 +2217,34 @@ dependencies = [ [[package]] name = "picky-krb" -version = "0.8.0" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f71cf61ebe6e657a81bcac31f9d61d52c23a1fd517b0dad77b915a7d3d15d2e8" +dependencies = [ + "aes", + "byteorder", + "cbc", + "crypto", + "des", + "hmac", + "num-bigint-dig", + "oid", + "pbkdf2", + "picky-asn1 0.8.0", + "picky-asn1-der 0.4.1", + "picky-asn1-x509 0.12.0", + "rand", + "serde", + "sha1", + "thiserror", + "uuid", +] + +[[package]] +name = "picky-krb" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71cf61ebe6e657a81bcac31f9d61d52c23a1fd517b0dad77b915a7d3d15d2e8" +checksum = "f5f3c62393fbe5538020af4f8b07d1647f99748becd207476417f8d2aa8900cd" dependencies = [ "aes", "byteorder", @@ -1827,9 +2255,9 @@ dependencies = [ "num-bigint-dig", "oid", "pbkdf2", - "picky-asn1", - "picky-asn1-der", - "picky-asn1-x509", + "picky-asn1 0.10.1", + "picky-asn1-der 0.5.2", + "picky-asn1-x509 0.14.3", "rand", "serde", "sha1", @@ -1839,9 +2267,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1872,9 +2300,21 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "polyval" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] [[package]] name = "portpicker" @@ -1893,9 +2333,22 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" +dependencies = [ + "proc-macro2", + "syn 2.0.96", +] [[package]] name = "primeorder" @@ -1908,18 +2361,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -1957,14 +2410,23 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rc2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" +dependencies = [ + "cipher", ] [[package]] name = "rdp-client" version = "0.1.0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "boring", "byteorder", "bytes", @@ -2008,18 +2470,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2029,9 +2491,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2040,9 +2502,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2050,13 +2512,13 @@ version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-rustls", @@ -2067,7 +2529,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.12", "rustls-native-certs", "rustls-pemfile", "serde", @@ -2076,7 +2538,7 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", @@ -2104,7 +2566,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -2113,9 +2575,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -2125,6 +2587,7 @@ dependencies = [ "pkcs1", "pkcs8", "rand_core", + "sha1", "signature", "spki", "subtle", @@ -2145,9 +2608,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -2163,15 +2626,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2182,10 +2645,25 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" +dependencies = [ + "aws-lc-rs", + "log", + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -2204,9 +2682,15 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64", + "base64 0.21.7", ] +[[package]] +name = "rustls-pki-types" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -2217,19 +2701,37 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2264,11 +2766,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation", "core-foundation-sys", "libc", @@ -2277,9 +2779,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -2287,15 +2789,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -2311,22 +2813,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.118" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2426,9 +2929,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2460,7 +2963,7 @@ source = "git+https://github.com/Devolutions/sspi-rs?rev=d54bdfcafa0e10d9d78224e dependencies = [ "async-dnssd", "async-recursion", - "bitflags 2.6.0", + "bitflags 2.8.0", "byteorder", "cfg-if", "crypto-mac", @@ -2474,10 +2977,10 @@ dependencies = [ "num-traits", "oid", "picky", - "picky-asn1", - "picky-asn1-der", - "picky-asn1-x509", - "picky-krb", + "picky-asn1 0.8.0", + "picky-asn1-der 0.4.1", + "picky-asn1-x509 0.12.0", + "picky-krb 0.8.0", "portpicker", "rand", "reqwest", @@ -2491,7 +2994,7 @@ dependencies = [ "url", "uuid", "winapi", - "windows", + "windows 0.51.1", "windows-sys 0.48.0", "winreg 0.51.0", "zeroize", @@ -2499,13 +3002,13 @@ dependencies = [ [[package]] name = "sspi" -version = "0.11.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d31fab47d9290be28a8d027c8428756826f1d4fe1e5ba0f51d24f52c568e21" +checksum = "b94e3c7aa94f5b440eedeab677686629bddcb43edf52ef3703038cce98e2bf70" dependencies = [ "async-dnssd", "async-recursion", - "bitflags 2.6.0", + "bitflags 2.8.0", "byteorder", "cfg-if", "crypto-mac", @@ -2519,11 +3022,13 @@ dependencies = [ "num-traits", "oid", "picky", - "picky-asn1", - "picky-asn1-der", - "picky-asn1-x509", - "picky-krb", + "picky-asn1 0.10.1", + "picky-asn1-der 0.5.2", + "picky-asn1-x509 0.14.3", + "picky-krb 0.9.2", "rand", + "rsa", + "rustls 0.23.22", "serde", "serde_derive", "sha1", @@ -2533,10 +3038,9 @@ dependencies = [ "tracing", "url", "uuid", - "winapi", - "windows", - "windows-sys 0.48.0", - "winreg 0.51.0", + "windows 0.58.0", + "windows-sys 0.59.0", + "winreg 0.52.0", "zeroize", ] @@ -2563,9 +3067,9 @@ dependencies = [ [[package]] name = "static_init_macro" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" +checksum = "1389c88ddd739ec6d3f8f83343764a0e944cd23cfbf126a9796a714b0b6edd6f" dependencies = [ "cfg_aliases", "memchr", @@ -2582,9 +3086,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2599,9 +3103,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -2622,7 +3126,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -2654,14 +3158,16 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", + "getrandom 0.3.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2681,22 +3187,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -2711,9 +3217,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -2733,29 +3239,24 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] [[package]] -name = "tinyvec" -version = "1.6.1" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tls_codec" version = "0.4.1" @@ -2774,26 +3275,25 @@ checksum = "8d9ef545650e79f30233c0003bcc2504d7efac6dad25fca40744de773fe2049c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "tokio" -version = "1.38.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2809,13 +3309,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -2824,15 +3324,25 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +dependencies = [ + "rustls 0.23.22", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -2852,15 +3362,15 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -2870,20 +3380,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -2902,9 +3412,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "nu-ansi-term", "sharded-slab", @@ -2940,25 +3450,20 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] -name = "unicode-normalization" -version = "0.1.23" +name = "universal-hash" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "tinyvec", + "crypto-common", + "subtle", ] [[package]] @@ -2969,15 +3474,21 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf16string" version = "0.2.0" @@ -2987,27 +3498,33 @@ dependencies = [ "byteorder", ] +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" -version = "1.9.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -3024,48 +3541,59 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3073,28 +3601,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -3106,6 +3637,18 @@ version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "widestring" version = "1.1.0" @@ -3130,11 +3673,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3149,10 +3692,20 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.51.1" @@ -3162,6 +3715,60 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3177,7 +3784,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3197,18 +3813,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3219,9 +3835,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3231,9 +3847,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3243,15 +3859,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3261,9 +3877,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3273,9 +3889,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3285,9 +3901,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3297,9 +3913,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" @@ -3321,6 +3937,37 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -3354,6 +4001,72 @@ dependencies = [ "tls_codec", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -3371,5 +4084,27 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", ] diff --git a/Cargo.toml b/Cargo.toml index 0324b56f83d01..bde18b84e4f74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,15 +23,18 @@ codegen-units = 1 [workspace.dependencies] # Note: To use a local IronRDP repository as a crate (for example, ironrdp-cliprdr), define the dependency as follows: # ironrdp-cliprdr = { path = "/path/to/local/IronRDP/crates/ironrdp-cliprdr" } -ironrdp-cliprdr = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-connector = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-displaycontrol = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-dvc = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-graphics = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-pdu = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-rdpdr = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-rdpsnd = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-session = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-svc = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-tls = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f", features = ["rustls"]} -ironrdp-tokio = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } +ironrdp-cliprdr = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-connector = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-core = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-displaycontrol = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-dvc = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-graphics = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-pdu = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-rdpdr = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-rdpsnd = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-session = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-svc = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-tls = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2", features = [ + "rustls", +] } +ironrdp-tokio = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } diff --git a/api/types/desktop.go b/api/types/desktop.go index 74cba39d078f4..8b20ae2331c07 100644 --- a/api/types/desktop.go +++ b/api/types/desktop.go @@ -366,3 +366,11 @@ type ListWindowsDesktopServicesRequest struct { Labels map[string]string SearchKeywords []string } + +// RDPLicenseKey is struct for retrieving licenses from backend cache, used only internally +type RDPLicenseKey struct { + Version uint32 // e.g. 0x000a0002 + Issuer string // e.g. example.com + Company string // e.g. Example Corporation + ProductID string // e.g. A02 +} diff --git a/lib/auth/storage/storage.go b/lib/auth/storage/storage.go index 76db71182e982..625cc393f8698 100644 --- a/lib/auth/storage/storage.go +++ b/lib/auth/storage/storage.go @@ -27,7 +27,9 @@ package storage import ( "context" "encoding/json" + "strconv" "strings" + "time" "github.com/coreos/go-semver/semver" "github.com/gravitational/trace" @@ -233,6 +235,42 @@ func (p *ProcessStorage) WriteTeleportVersion(ctx context.Context, version *semv return nil } +func rdpLicenseKey(key *types.RDPLicenseKey) backend.Key { + return backend.NewKey("rdplicense", key.Issuer, strconv.Itoa(int(key.Version)), key.Company, key.ProductID) +} + +type rdpLicense struct { + Data []byte `json:"data"` +} + +// WriteRDPLicense writes an RDP license to local storage. +func (p *ProcessStorage) WriteRDPLicense(ctx context.Context, key *types.RDPLicenseKey, license []byte) error { + value, err := json.Marshal(rdpLicense{Data: license}) + if err != nil { + return trace.Wrap(err) + } + item := backend.Item{ + Key: rdpLicenseKey(key), + Value: value, + Expires: p.BackendStorage.Clock().Now().Add(28 * 24 * time.Hour), + } + _, err = p.stateStorage.Put(ctx, item) + return trace.Wrap(err) +} + +// ReadRDPLicense reads a previously obtained license from storage. +func (p *ProcessStorage) ReadRDPLicense(ctx context.Context, key *types.RDPLicenseKey) ([]byte, error) { + item, err := p.stateStorage.Get(ctx, rdpLicenseKey(key)) + if err != nil { + return nil, trace.Wrap(err) + } + license := rdpLicense{} + if err := json.Unmarshal(item.Value, &license); err != nil { + return nil, trace.Wrap(err) + } + return license.Data, nil +} + // ReadLocalIdentity reads, parses and returns the given pub/pri key + cert from the // key storage (dataDir). func ReadLocalIdentity(dataDir string, id state.IdentityID) (*state.Identity, error) { diff --git a/lib/auth/storage/storage_test.go b/lib/auth/storage/storage_test.go new file mode 100644 index 0000000000000..42302101c7036 --- /dev/null +++ b/lib/auth/storage/storage_test.go @@ -0,0 +1,72 @@ +// Teleport +// Copyright (C) 2025 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package storage + +import ( + "context" + "testing" + + "github.com/gravitational/trace" + "github.com/stretchr/testify/require" + + "github.com/gravitational/teleport/api/types" + "github.com/gravitational/teleport/lib/backend/memory" +) + +func TestRDPLicense(t *testing.T) { + ctx := context.Background() + mem, err := memory.New(memory.Config{}) + require.NoError(t, err) + storage := ProcessStorage{ + BackendStorage: mem, + stateStorage: mem, + } + + _, err = storage.ReadRDPLicense(ctx, &types.RDPLicenseKey{ + Version: 1, + Issuer: "issuer", + Company: "company", + ProductID: "productID", + }) + require.True(t, trace.IsNotFound(err)) + + licenseData := []byte{1, 2, 3} + err = storage.WriteRDPLicense(ctx, &types.RDPLicenseKey{ + Version: 1, + Issuer: "issuer", + Company: "company", + ProductID: "productID", + }, licenseData) + require.NoError(t, err) + + _, err = storage.ReadRDPLicense(ctx, &types.RDPLicenseKey{ + Version: 2, + Issuer: "issuer", + Company: "company", + ProductID: "productID", + }) + require.True(t, trace.IsNotFound(err)) + + license, err := storage.ReadRDPLicense(ctx, &types.RDPLicenseKey{ + Version: 1, + Issuer: "issuer", + Company: "company", + ProductID: "productID", + }) + require.NoError(t, err) + require.Equal(t, licenseData, license) +} diff --git a/lib/service/desktop.go b/lib/service/desktop.go index 9a1d411052ed6..c156858a34e16 100644 --- a/lib/service/desktop.go +++ b/lib/service/desktop.go @@ -212,6 +212,7 @@ func (process *TeleportProcess) initWindowsDesktopServiceRegistered(logger *slog srv, err := desktop.NewWindowsService(desktop.WindowsServiceConfig{ DataDir: process.Config.DataDir, Log: process.log.WithField(teleport.ComponentKey, teleport.Component(teleport.ComponentWindowsDesktop, process.id)), + LicenseStore: process.storage, Clock: process.Clock, Authorizer: authorizer, Emitter: conn.Client, diff --git a/lib/srv/desktop/rdp/rdpclient/client.go b/lib/srv/desktop/rdp/rdpclient/client.go index e194fa96891be..e2061ab569086 100644 --- a/lib/srv/desktop/rdp/rdpclient/client.go +++ b/lib/srv/desktop/rdp/rdpclient/client.go @@ -72,6 +72,7 @@ import "C" import ( "context" + "encoding/binary" "fmt" "os" "runtime/cgo" @@ -80,6 +81,7 @@ import ( "time" "unsafe" + "github.com/google/uuid" "github.com/gravitational/trace" "github.com/sirupsen/logrus" @@ -304,6 +306,19 @@ func (c *Client) startRustRDP(ctx context.Context) error { return trace.BadParameter("user key was nil") } + hostID, err := uuid.Parse(c.cfg.HostID) + if err != nil { + return trace.Wrap(err) + } + + nextHostID := hostID[:] + cHostID := [4]C.uint32_t{} + for i := 0; i < len(cHostID); i++ { + const uint32Len = 4 + cHostID[i] = (C.uint32_t)(binary.LittleEndian.Uint32(nextHostID[:uint32Len])) + nextHostID = nextHostID[uint32Len:] + } + res := C.client_run( C.uintptr_t(c.handle), C.CGOConnectParams{ @@ -319,6 +334,7 @@ func (c *Client) startRustRDP(ctx context.Context) error { allow_clipboard: C.bool(c.cfg.AllowClipboard), allow_directory_sharing: C.bool(c.cfg.AllowDirectorySharing), show_desktop_wallpaper: C.bool(c.cfg.ShowDesktopWallpaper), + client_id: cHostID, }, ) @@ -716,6 +732,106 @@ func toClient(handle C.uintptr_t) (value *Client, err error) { return cgo.Handle(handle).Value().(*Client), nil } +//export cgo_read_rdp_license +func cgo_read_rdp_license(handle C.uintptr_t, req *C.CGOLicenseRequest, data_out **C.uint8_t, len_out *C.size_t) C.CGOErrCode { + *data_out = nil + *len_out = 0 + + client, err := toClient(handle) + if err != nil { + return C.ErrCodeFailure + } + + issuer := C.GoString(req.issuer) + company := C.GoString(req.company) + productID := C.GoString(req.product_id) + + license, err := client.readRDPLicense(context.Background(), types.RDPLicenseKey{ + Version: uint32(req.version), + Issuer: issuer, + Company: company, + ProductID: productID, + }) + if trace.IsNotFound(err) { + return C.ErrCodeNotFound + } else if err != nil { + return C.ErrCodeFailure + } + + // in this case, we expect the caller to use cgo_free_rdp_license + // when the data is no longer needed + *data_out = (*C.uint8_t)(C.CBytes(license)) + *len_out = C.size_t(len(license)) + return C.ErrCodeSuccess +} + +//export cgo_free_rdp_license +func cgo_free_rdp_license(p *C.uint8_t) { + C.free(unsafe.Pointer(p)) +} + +//export cgo_write_rdp_license +func cgo_write_rdp_license(handle C.uintptr_t, req *C.CGOLicenseRequest, data *C.uint8_t, length C.size_t) C.CGOErrCode { + client, err := toClient(handle) + if err != nil { + return C.ErrCodeFailure + } + + issuer := C.GoString(req.issuer) + company := C.GoString(req.company) + productID := C.GoString(req.product_id) + + licenseData := C.GoBytes(unsafe.Pointer(data), C.int(length)) + + err = client.writeRDPLicense(context.Background(), types.RDPLicenseKey{ + Version: uint32(req.version), + Issuer: issuer, + Company: company, + ProductID: productID, + }, licenseData) + if err != nil { + return C.ErrCodeFailure + } + + return C.ErrCodeSuccess +} + +func (c *Client) readRDPLicense(ctx context.Context, key types.RDPLicenseKey) ([]byte, error) { + log := c.cfg.Logger.With( + "issuer", key.Issuer, + "company", key.Company, + "version", key.Version, + "product", key.ProductID, + ) + + license, err := c.cfg.LicenseStore.ReadRDPLicense(ctx, &key) + switch { + case trace.IsNotFound(err): + log.InfoContext(ctx, "existing RDP license not found") + case err != nil: + log.ErrorContext(ctx, "could not look up existing RDP license", "error", err) + case len(license) > 0: + log.InfoContext(ctx, "found existing RDP license") + } + + return license, trace.Wrap(err) +} + +func (c *Client) writeRDPLicense(ctx context.Context, key types.RDPLicenseKey, license []byte) error { + log := c.cfg.Logger.With( + "issuer", key.Issuer, + "company", key.Company, + "version", key.Version, + "product", key.ProductID, + ) + log.InfoContext(ctx, "writing RDP license to storage") + err := c.cfg.LicenseStore.WriteRDPLicense(ctx, &key, license) + if err != nil { + log.ErrorContext(ctx, "could not write RDP license", "error", err) + } + return trace.Wrap(err) +} + //export cgo_handle_fastpath_pdu func cgo_handle_fastpath_pdu(handle C.uintptr_t, data *C.uint8_t, length C.uint32_t) C.CGOErrCode { goData := asRustBackedSlice(data, int(length)) diff --git a/lib/srv/desktop/rdp/rdpclient/client_common.go b/lib/srv/desktop/rdp/rdpclient/client_common.go index 9efe72dad2e18..7217813226a73 100644 --- a/lib/srv/desktop/rdp/rdpclient/client_common.go +++ b/lib/srv/desktop/rdp/rdpclient/client_common.go @@ -27,13 +27,25 @@ import ( "github.com/gravitational/trace" "github.com/sirupsen/logrus" + "github.com/gravitational/teleport/api/types" "github.com/gravitational/teleport/lib/srv/desktop/tdp" ) +// LicenseStore implements client-side license storage for Microsoft +// Remote Desktop Services (RDS) licenses. +type LicenseStore interface { + WriteRDPLicense(ctx context.Context, key *types.RDPLicenseKey, license []byte) error + ReadRDPLicense(ctx context.Context, key *types.RDPLicenseKey) ([]byte, error) +} + // Config for creating a new Client. type Config struct { // Addr is the network address of the RDP server, in the form host:port. Addr string + + LicenseStore LicenseStore + HostID string + // UserCertGenerator generates user certificates for RDP authentication. GenerateUserCert GenerateUserCertFn CertTTL time.Duration diff --git a/lib/srv/desktop/rdp/rdpclient/src/client.rs b/lib/srv/desktop/rdp/rdpclient/src/client.rs index 116813e9ebdf9..669eec3dbe806 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/client.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/client.rs @@ -68,6 +68,7 @@ use tokio::sync::mpsc::{channel, error::SendError, Receiver, Sender}; use tokio::task::JoinError; // Export this for crate level use. use crate::cliprdr::{ClipboardFn, TeleportCliprdrBackend}; +use crate::license::GoLicenseCache; use crate::rdpdr::scard::SCARD_DEVICE_ID; use crate::rdpdr::TeleportRdpdrBackend; use crate::ssl::TlsStream; @@ -143,7 +144,7 @@ impl Client { let mut rng = rand_chacha::ChaCha20Rng::from_entropy(); let pin = format!("{:08}", rng.gen_range(0i32..=99999999i32)); - let connector_config = create_config(¶ms, pin.clone()); + let connector_config = create_config(¶ms, pin.clone(), cgo_handle); // Create a channel for sending/receiving function calls to/from the Client. let (client_handle, function_receiver) = ClientHandle::new(100); @@ -1384,7 +1385,7 @@ impl FunctionReceiver { type RdpReadStream = Framed>>>; type RdpWriteStream = Framed>>>; -fn create_config(params: &ConnectParams, pin: String) -> Config { +fn create_config(params: &ConnectParams, pin: String, cgo_handle: CgoHandle) -> Config { Config { desktop_size: ironrdp_connector::DesktopSize { width: params.screen_width, @@ -1424,6 +1425,8 @@ fn create_config(params: &ConnectParams, pin: String) -> Config { PerformanceFlags::empty() }, desktop_scale_factor: 0, + license_cache: Some(Arc::new(GoLicenseCache { cgo_handle })), + hardware_id: Some(params.client_id), } } @@ -1437,6 +1440,7 @@ pub struct ConnectParams { pub allow_clipboard: bool, pub allow_directory_sharing: bool, pub show_desktop_wallpaper: bool, + pub client_id: [u32; 4], } #[derive(Debug)] diff --git a/lib/srv/desktop/rdp/rdpclient/src/lib.rs b/lib/srv/desktop/rdp/rdpclient/src/lib.rs index 217e11181d7c6..44f29dc4700ce 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/lib.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/lib.rs @@ -44,6 +44,7 @@ use std::ptr; use util::{from_c_string, from_go_array}; pub mod client; mod cliprdr; +mod license; mod piv; mod rdpdr; mod ssl; @@ -102,6 +103,7 @@ pub unsafe extern "C" fn client_run(cgo_handle: CgoHandle, params: CGOConnectPar allow_clipboard: params.allow_clipboard, allow_directory_sharing: params.allow_directory_sharing, show_desktop_wallpaper: params.show_desktop_wallpaper, + client_id: params.client_id, }, ) { Ok(res) => CGOResult { @@ -474,6 +476,7 @@ pub struct CGOConnectParams { allow_clipboard: bool, allow_directory_sharing: bool, show_desktop_wallpaper: bool, + client_id: [u32; 4], } /// CGOKeyboardEvent is a CGO-compatible version of KeyboardEvent that we pass back to Go. @@ -544,6 +547,7 @@ pub enum CGOErrCode { ErrCodeSuccess = 0, ErrCodeFailure = 1, ErrCodeClientPtr = 2, + ErrCodeNotFound = 3, } #[repr(C)] @@ -698,6 +702,19 @@ pub type CGOSharedDirectoryTruncateResponse = SharedDirectoryTruncateResponse; // These functions are defined on the Go side. // Look for functions with '//export funcname' comments. extern "C" { + fn cgo_free_rdp_license(data: *mut u8); + fn cgo_read_rdp_license( + cgo_handle: CgoHandle, + req: *mut CGOLicenseRequest, + data_out: *mut *mut u8, + len_out: *mut usize, + ) -> CGOErrCode; + fn cgo_write_rdp_license( + cgo_handle: CgoHandle, + req: *mut CGOLicenseRequest, + data: *mut u8, + length: usize, + ) -> CGOErrCode; fn cgo_handle_remote_copy(cgo_handle: CgoHandle, data: *mut u8, len: u32) -> CGOErrCode; fn cgo_handle_fastpath_pdu(cgo_handle: CgoHandle, data: *mut u8, len: u32) -> CGOErrCode; fn cgo_handle_rdp_connection_activated( @@ -749,3 +766,11 @@ extern "C" { /// /// [cgo.Handle]: https://pkg.go.dev/runtime/cgo#Handle type CgoHandle = usize; + +#[repr(C)] +pub struct CGOLicenseRequest { + version: u32, + issuer: *const c_char, + company: *const c_char, + product_id: *const c_char, +} diff --git a/lib/srv/desktop/rdp/rdpclient/src/license.rs b/lib/srv/desktop/rdp/rdpclient/src/license.rs new file mode 100644 index 0000000000000..3636d2d4c6eb3 --- /dev/null +++ b/lib/srv/desktop/rdp/rdpclient/src/license.rs @@ -0,0 +1,85 @@ +// Teleport +// Copyright (C) 2025 Gravitational, Inc. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +use crate::{ + cgo_free_rdp_license, cgo_read_rdp_license, cgo_write_rdp_license, CGOErrCode, + CGOLicenseRequest, CgoHandle, +}; +use ironrdp_connector::{custom_err, general_err, ConnectorError, ConnectorResult, LicenseCache}; +use ironrdp_pdu::rdp::server_license::LicenseInformation; +use picky_krb::negoex::NegoexDataType; +use std::ffi::{CString, NulError}; +use std::{ptr, slice}; + +#[derive(Debug)] +pub(crate) struct GoLicenseCache { + pub(crate) cgo_handle: CgoHandle, +} + +fn conversion_error(e: NulError) -> ConnectorError { + custom_err!("conversion error", e) +} + +impl LicenseCache for GoLicenseCache { + fn get_license(&self, license_info: LicenseInformation) -> ConnectorResult>> { + let issuer = CString::new(license_info.scope).map_err(conversion_error)?; + let company = CString::new(license_info.company_name).map_err(conversion_error)?; + let product_id = CString::new(license_info.product_id).map_err(conversion_error)?; + let mut req = CGOLicenseRequest { + version: license_info.version, + issuer: issuer.as_ptr(), + company: company.as_ptr(), + product_id: product_id.as_ptr(), + }; + let mut data: *mut u8 = ptr::null_mut(); + let mut size = 0usize; + unsafe { + match cgo_read_rdp_license(self.cgo_handle, &mut req, &mut data, &mut size) { + CGOErrCode::ErrCodeSuccess => { + let license = slice::from_raw_parts_mut(data, size).to_vec(); + cgo_free_rdp_license(data); + Ok(Some(license)) + } + CGOErrCode::ErrCodeFailure => Err(general_err!("error retrieving license")), + CGOErrCode::ErrCodeClientPtr => Err(general_err!("invalid client pointer")), + CGOErrCode::ErrCodeNotFound => Ok(None), + } + } + } + + fn store_license(&self, mut license_info: LicenseInformation) -> ConnectorResult<()> { + let issuer = CString::new(license_info.scope).map_err(conversion_error)?; + let company = CString::new(license_info.company_name).map_err(conversion_error)?; + let product_id = CString::new(license_info.product_id).map_err(conversion_error)?; + let mut req = CGOLicenseRequest { + version: license_info.version, + issuer: issuer.as_ptr(), + company: company.as_ptr(), + product_id: product_id.as_ptr(), + }; + unsafe { + match cgo_write_rdp_license( + self.cgo_handle, + &mut req, + license_info.license_info.as_mut_ptr(), + license_info.license_info.size(), + ) { + CGOErrCode::ErrCodeSuccess => Ok(()), + _ => Err(general_err!("error storing license")), + } + } + } +} diff --git a/lib/srv/desktop/windows_server.go b/lib/srv/desktop/windows_server.go index 44e2ebd148d9a..233d65f484ef1 100644 --- a/lib/srv/desktop/windows_server.go +++ b/lib/srv/desktop/windows_server.go @@ -151,8 +151,9 @@ type WindowsServiceConfig struct { // Log is the logging sink for the service. Log logrus.FieldLogger // Clock provides current time. - Clock clockwork.Clock - DataDir string + Clock clockwork.Clock + DataDir string + LicenseStore rdpclient.LicenseStore // Authorizer is used to authorize requests. Authorizer authz.Authorizer // LockWatcher is used to monitor for new locks. @@ -860,7 +861,9 @@ func (s *WindowsService) connectRDP(ctx context.Context, log logrus.FieldLogger, //nolint:staticcheck // SA4023. False positive, depends on build tags. rdpc, err := rdpclient.New(rdpclient.Config{ - Log: log, + Log: log, + LicenseStore: s.cfg.LicenseStore, + HostID: s.cfg.Heartbeat.HostUUID, GenerateUserCert: func(ctx context.Context, username string, ttl time.Duration) (certDER, keyDER []byte, err error) { return s.generateUserCert(ctx, username, ttl, desktop, createUsers, groups) }, From cc1c685e9ce5d703c94b4f2c8177dd01ce3538d9 Mon Sep 17 00:00:00 2001 From: Przemko Robakowski Date: Mon, 10 Feb 2025 19:02:27 +0100 Subject: [PATCH 2/8] bump rust --- build.assets/versions.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.assets/versions.mk b/build.assets/versions.mk index 6d8bfe926214e..6696cdde65805 100644 --- a/build.assets/versions.mk +++ b/build.assets/versions.mk @@ -9,7 +9,7 @@ GOLANGCI_LINT_VERSION ?= v1.63.4 NODE_VERSION ?= 20.18.0 # Run lint-rust check locally before merging code after you bump this. -RUST_VERSION ?= 1.77.0 +RUST_VERSION ?= 1.81.0 WASM_PACK_VERSION ?= 0.12.1 LIBBPF_VERSION ?= 1.2.2 LIBPCSCLITE_VERSION ?= 1.9.9-teleport From 7021fafe174103d10ce77875f4c20c71cd26593c Mon Sep 17 00:00:00 2001 From: Przemko Robakowski Date: Mon, 10 Feb 2025 19:08:20 +0100 Subject: [PATCH 3/8] add dependency reviews from master --- .github/workflows/dependency-review.yaml | 28 ++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml index 24260fa4e9336..71c9fd97dc591 100644 --- a/.github/workflows/dependency-review.yaml +++ b/.github/workflows/dependency-review.yaml @@ -36,10 +36,30 @@ jobs: pkg:cargo/asn1-rs-derive, pkg:cargo/asn1-rs-impl, pkg:cargo/curve25519-dalek-derive, + pkg:cargo/der-parser, + pkg:cargo/icu_collections, + pkg:cargo/icu_locid, + pkg:cargo/icu_locid_transform, + pkg:cargo/icu_locid_transform_data, + pkg:cargo/icu_normalizer, + pkg:cargo/icu_normalizer_data, + pkg:cargo/icu_properties, + pkg:cargo/icu_properties_data, + pkg:cargo/icu_provider, + pkg:cargo/icu_provider_macros, + pkg:cargo/litemap, + pkg:cargo/openssl-probe, pkg:cargo/ring, pkg:cargo/sspi, pkg:cargo/tokio-boring, - pkg:cargo/asn1-rs, - pkg:cargo/asn1-rs-derive, - pkg:cargo/asn1-rs-impl, - pkg:cargo/der-parser + pkg:cargo/tokio-rustls, + pkg:cargo/unicode-ident, + pkg:cargo/writeable, + pkg:cargo/yoke, + pkg:cargo/yoke-derive, + pkg:cargo/zerofrom, + pkg:cargo/zerofrom-derive, + pkg:cargo/zerovec, + pkg:cargo/zerovec-derive, + pkg:npm/cspell/dict-en-common-misspellings, + pkg:npm/prettier From b9d42340fc21b633146fa014b57058b0e47c3c67 Mon Sep 17 00:00:00 2001 From: Przemko Robakowski Date: Mon, 10 Feb 2025 21:51:33 +0100 Subject: [PATCH 4/8] Fix compilation after IronRDP bump --- Cargo.lock | 607 +++++++----------- lib/srv/desktop/rdp/rdpclient/Cargo.toml | 25 +- lib/srv/desktop/rdp/rdpclient/src/client.rs | 35 +- lib/srv/desktop/rdp/rdpclient/src/lib.rs | 14 +- lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs | 7 +- .../rdp/rdpclient/src/rdpdr/filesystem.rs | 35 +- .../desktop/rdp/rdpclient/src/rdpdr/tdp.rs | 13 +- 7 files changed, 309 insertions(+), 427 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a55b85a805152..3498c3ba3fd4f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,6 +70,56 @@ dependencies = [ "memchr", ] +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +dependencies = [ + "anstyle", + "once_cell", + "windows-sys 0.59.0", +] + [[package]] name = "asn1-rs" version = "0.6.2" @@ -153,7 +203,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", "winapi", ] @@ -210,12 +260,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -321,8 +365,8 @@ dependencies = [ [[package]] name = "boring" -version = "4.4.0" -source = "git+https://github.com/gravitational/boring?rev=605253d99d5e363e178bcf97e1d4622e33844cd5#605253d99d5e363e178bcf97e1d4622e33844cd5" +version = "4.7.0" +source = "git+https://github.com/gravitational/boring?rev=99897308abb5976ea05625b8314c24b16eebb01b#99897308abb5976ea05625b8314c24b16eebb01b" dependencies = [ "bitflags 2.8.0", "boring-sys", @@ -333,8 +377,8 @@ dependencies = [ [[package]] name = "boring-sys" -version = "4.4.0" -source = "git+https://github.com/gravitational/boring?rev=605253d99d5e363e178bcf97e1d4622e33844cd5#605253d99d5e363e178bcf97e1d4622e33844cd5" +version = "4.7.0" +source = "git+https://github.com/gravitational/boring?rev=99897308abb5976ea05625b8314c24b16eebb01b#99897308abb5976ea05625b8314c24b16eebb01b" dependencies = [ "bindgen 0.68.1", "cmake", @@ -356,9 +400,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "cbc" @@ -377,7 +421,7 @@ checksum = "da6bc11b07529f16944307272d5bd9b22530bc7d05751717c9d416586cedab49" dependencies = [ "clap", "heck", - "indexmap 1.9.3", + "indexmap", "log", "proc-macro2", "quote", @@ -450,7 +494,7 @@ dependencies = [ "atty", "bitflags 1.3.2", "clap_lex", - "indexmap 1.9.3", + "indexmap", "strsim", "termcolor", "textwrap", @@ -474,6 +518,12 @@ dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -492,9 +542,9 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" dependencies = [ "core-foundation-sys", "libc", @@ -759,33 +809,28 @@ dependencies = [ ] [[package]] -name = "encoding_rs" -version = "0.8.35" +name = "env_filter" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ - "cfg-if", + "log", + "regex", ] [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - [[package]] name = "errno" version = "0.3.10" @@ -1046,25 +1091,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.7.1", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "hash32" version = "0.2.1" @@ -1080,12 +1106,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" - [[package]] name = "heapless" version = "0.7.17" @@ -1114,12 +1134,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - [[package]] name = "hex" version = "0.4.3" @@ -1155,9 +1169,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.12" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1165,24 +1179,25 @@ dependencies = [ ] [[package]] -name = "http" -version = "1.2.0" +name = "http-body" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "fnv", - "itoa", + "http", ] [[package]] -name = "http-body" -version = "0.4.6" +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "http 0.2.12", + "futures-util", + "http", + "http-body", "pin-project-lite", ] @@ -1192,12 +1207,6 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "humantime" version = "2.1.0" @@ -1206,40 +1215,57 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.32" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", - "http 0.2.12", + "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", - "http 0.2.12", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", "hyper", - "rustls 0.21.12", + "pin-project-lite", + "socket2", "tokio", - "tokio-rustls 0.24.1", + "tower-service", + "tracing", ] [[package]] @@ -1388,17 +1414,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" -dependencies = [ - "equivalent", - "hashbrown 0.15.2", + "hashbrown", ] [[package]] @@ -1480,10 +1496,10 @@ dependencies = [ "ironrdp-pdu", "ironrdp-svc", "picky", - "picky-asn1-der 0.5.2", - "picky-asn1-x509 0.14.3", + "picky-asn1-der", + "picky-asn1-x509", "rand_core", - "sspi 0.15.0", + "sspi", "tracing", "url", ] @@ -1622,7 +1638,7 @@ version = "0.1.1" source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "tokio", - "tokio-rustls 0.26.1", + "tokio-rustls", "x509-cert", ] @@ -1637,15 +1653,10 @@ dependencies = [ ] [[package]] -name = "is-terminal" -version = "0.4.15" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37" -dependencies = [ - "hermit-abi 0.4.0", - "libc", - "windows-sys 0.59.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "iso7816" @@ -2107,23 +2118,23 @@ dependencies = [ "aes", "aes-gcm", "aes-kw", - "base64 0.22.1", + "base64", "cbc", "des", "digest", "ed25519-dalek", "hex", "hmac", - "http 1.2.0", + "http", "md-5", "num-bigint-dig", "p256", "p384", "p521", "pbkdf2", - "picky-asn1 0.10.1", - "picky-asn1-der 0.5.2", - "picky-asn1-x509 0.14.3", + "picky-asn1", + "picky-asn1-der", + "picky-asn1-x509", "rand", "rand_core", "rc2", @@ -2138,18 +2149,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "picky-asn1" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295eea0f33c16be21e2a98b908fdd4d73c04dd48c8480991b76dbcf0cb58b212" -dependencies = [ - "oid", - "serde", - "serde_bytes", - "time", -] - [[package]] name = "picky-asn1" version = "0.10.1" @@ -2163,83 +2162,33 @@ dependencies = [ "zeroize", ] -[[package]] -name = "picky-asn1-der" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5df7873a9e36d42dadb393bea5e211fe83d793c172afad5fb4ec846ec582793f" -dependencies = [ - "picky-asn1 0.8.0", - "serde", - "serde_bytes", -] - [[package]] name = "picky-asn1-der" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dccb53c26f70c082e008818f524bd45d057069517b047bd0c0ee062d6d7d7f2" dependencies = [ - "picky-asn1 0.10.1", + "picky-asn1", "serde", "serde_bytes", ] -[[package]] -name = "picky-asn1-x509" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c5f20f71a68499ff32310f418a6fad8816eac1a2859ed3f0c5c741389dd6208" -dependencies = [ - "base64 0.21.7", - "oid", - "picky-asn1 0.8.0", - "picky-asn1-der 0.4.1", - "serde", - "widestring", -] - [[package]] name = "picky-asn1-x509" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "511c46b93e7f08571a375882879d3a468dfe8793d73249907b2e3332950cb33e" dependencies = [ - "base64 0.22.1", + "base64", "num-bigint-dig", "oid", - "picky-asn1 0.10.1", - "picky-asn1-der 0.5.2", + "picky-asn1", + "picky-asn1-der", "serde", "widestring", "zeroize", ] -[[package]] -name = "picky-krb" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71cf61ebe6e657a81bcac31f9d61d52c23a1fd517b0dad77b915a7d3d15d2e8" -dependencies = [ - "aes", - "byteorder", - "cbc", - "crypto", - "des", - "hmac", - "num-bigint-dig", - "oid", - "pbkdf2", - "picky-asn1 0.8.0", - "picky-asn1-der 0.4.1", - "picky-asn1-x509 0.12.0", - "rand", - "serde", - "sha1", - "thiserror", - "uuid", -] - [[package]] name = "picky-krb" version = "0.9.2" @@ -2255,9 +2204,9 @@ dependencies = [ "num-bigint-dig", "oid", "pbkdf2", - "picky-asn1 0.10.1", - "picky-asn1-der 0.5.2", - "picky-asn1-x509 0.14.3", + "picky-asn1", + "picky-asn1-der", + "picky-asn1-x509", "rand", "serde", "sha1", @@ -2447,14 +2396,21 @@ dependencies = [ "iso7816-tlv", "log", "parking_lot 0.12.3", + "picky", + "picky-asn1-der", + "picky-asn1-x509", + "picky-krb", "rand", "rand_chacha", + "reqwest", "rsa", - "sspi 0.10.1", + "rustls", + "sspi", "static_init", "tempfile", "tokio", "tokio-boring", + "url", "utf16string", "uuid", ] @@ -2508,20 +2464,21 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ - "base64 0.21.7", + "base64", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", - "http 0.2.12", + "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", + "hyper-util", "ipnet", "js-sys", "log", @@ -2529,23 +2486,22 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", - "rustls-native-certs", + "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", + "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", - "winreg 0.50.0", + "windows-registry", ] [[package]] @@ -2637,18 +2593,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - [[package]] name = "rustls" version = "0.23.22" @@ -2659,30 +2603,30 @@ dependencies = [ "log", "once_cell", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.21.7", + "rustls-pki-types", ] [[package]] @@ -2691,16 +2635,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustls-webpki" version = "0.102.8" @@ -2740,16 +2674,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sec1" version = "0.7.3" @@ -2766,9 +2690,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ "bitflags 2.8.0", "core-foundation", @@ -2956,50 +2880,6 @@ dependencies = [ "der", ] -[[package]] -name = "sspi" -version = "0.10.1" -source = "git+https://github.com/Devolutions/sspi-rs?rev=d54bdfcafa0e10d9d78224ebacc4f2a0992a6b79#d54bdfcafa0e10d9d78224ebacc4f2a0992a6b79" -dependencies = [ - "async-dnssd", - "async-recursion", - "bitflags 2.8.0", - "byteorder", - "cfg-if", - "crypto-mac", - "futures", - "hmac", - "lazy_static", - "md-5", - "md4", - "num-bigint-dig", - "num-derive", - "num-traits", - "oid", - "picky", - "picky-asn1 0.8.0", - "picky-asn1-der 0.4.1", - "picky-asn1-x509 0.12.0", - "picky-krb 0.8.0", - "portpicker", - "rand", - "reqwest", - "serde", - "serde_derive", - "sha1", - "sha2", - "time", - "tokio", - "tracing", - "url", - "uuid", - "winapi", - "windows 0.51.1", - "windows-sys 0.48.0", - "winreg 0.51.0", - "zeroize", -] - [[package]] name = "sspi" version = "0.15.0" @@ -3022,13 +2902,16 @@ dependencies = [ "num-traits", "oid", "picky", - "picky-asn1 0.10.1", - "picky-asn1-der 0.5.2", - "picky-asn1-x509 0.14.3", - "picky-krb 0.9.2", + "picky-asn1", + "picky-asn1-der", + "picky-asn1-x509", + "picky-krb", + "portpicker", "rand", + "reqwest", "rsa", - "rustls 0.23.22", + "rustls", + "rustls-native-certs", "serde", "serde_derive", "sha1", @@ -3038,9 +2921,9 @@ dependencies = [ "tracing", "url", "uuid", - "windows 0.58.0", + "windows", "windows-sys 0.59.0", - "winreg 0.52.0", + "winreg", "zeroize", ] @@ -3114,9 +2997,12 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] [[package]] name = "synstructure" @@ -3129,27 +3015,6 @@ dependencies = [ "syn 2.0.96", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tap" version = "1.0.1" @@ -3298,8 +3163,8 @@ dependencies = [ [[package]] name = "tokio-boring" -version = "4.4.0" -source = "git+https://github.com/gravitational/boring?rev=605253d99d5e363e178bcf97e1d4622e33844cd5#605253d99d5e363e178bcf97e1d4622e33844cd5" +version = "4.7.0" +source = "git+https://github.com/gravitational/boring?rev=99897308abb5976ea05625b8314c24b16eebb01b#99897308abb5976ea05625b8314c24b16eebb01b" dependencies = [ "boring", "boring-sys", @@ -3320,45 +3185,43 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.21.12", + "rustls", "tokio", ] [[package]] -name = "tokio-rustls" -version = "0.26.1" +name = "toml" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "rustls 0.23.22", - "tokio", + "serde", ] [[package]] -name = "tokio-util" -version = "0.7.13" +name = "tower" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ - "bytes", "futures-core", - "futures-sink", + "futures-util", "pin-project-lite", + "sync_wrapper", "tokio", + "tower-layer", + "tower-service", ] [[package]] -name = "toml" -version = "0.5.11" +name = "tower-layer" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" @@ -3504,6 +3367,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.12.1" @@ -3631,12 +3500,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "which" version = "4.4.2" @@ -3686,35 +3549,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[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.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-core 0.58.0", + "windows-core", "windows-targets 0.52.6", ] -[[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.58.0" @@ -3750,6 +3594,17 @@ dependencies = [ "syn 2.0.96", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.2.0" @@ -3917,26 +3772,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "winreg" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "winreg" version = "0.52.0" diff --git a/lib/srv/desktop/rdp/rdpclient/Cargo.toml b/lib/srv/desktop/rdp/rdpclient/Cargo.toml index f4a81d1845b7b..838bac2439d10 100644 --- a/lib/srv/desktop/rdp/rdpclient/Cargo.toml +++ b/lib/srv/desktop/rdp/rdpclient/Cargo.toml @@ -9,11 +9,11 @@ publish.workspace = true crate-type = ["staticlib"] [dependencies] -bitflags = "2.4.2" -boring = { git = "https://github.com/gravitational/boring", rev="605253d99d5e363e178bcf97e1d4622e33844cd5", optional = true } +bitflags = "2.8.0" +boring = { git = "https://github.com/gravitational/boring", rev = "99897308abb5976ea05625b8314c24b16eebb01b", optional = true } byteorder = "1.5.0" -bytes = "1.4.0" -env_logger = "0.10.1" +bytes = "1.10.0" +env_logger = "0.11.6" ironrdp-cliprdr.workspace = true ironrdp-connector.workspace = true ironrdp-pdu.workspace = true @@ -31,13 +31,20 @@ log = "0.4.20" parking_lot = "0.12.1" rand = { version = "0.8.5", features = ["getrandom"] } rand_chacha = "0.3.1" -rsa = "0.9.6" -sspi = { git = "https://github.com/Devolutions/sspi-rs", rev="d54bdfcafa0e10d9d78224ebacc4f2a0992a6b79", features = ["network_client"] } +rsa = "0.9.7" +sspi = { version = "0.15.0", features = ["network_client"] } static_init = "1.0.3" -tokio = { version = "1.36", features = ["full"] } -tokio-boring = { git = "https://github.com/gravitational/boring", rev="605253d99d5e363e178bcf97e1d4622e33844cd5", optional = true } +tokio = { version = "1.43", features = ["full"] } +tokio-boring = { git = "https://github.com/gravitational/boring", rev = "99897308abb5976ea05625b8314c24b16eebb01b", optional = true } utf16string = "0.2.0" -uuid = { version = "1.8.0", features = ["v4"] } +uuid = { version = "1.12.1", features = ["v4"] } +url = "2.5.4" +picky = { version = "7.0.0-rc.11", default-features = false } +picky-asn1-der = "0.5.2" +picky-asn1-x509 = "0.14.3" +picky-krb = "0.9.2" +reqwest = { version = "0.12", default-features = false } +rustls = { version = "0.23.22", default-features = false, features = ["aws-lc-rs"] } [build-dependencies] cbindgen = "0.26.0" diff --git a/lib/srv/desktop/rdp/rdpclient/src/client.rs b/lib/srv/desktop/rdp/rdpclient/src/client.rs index 669eec3dbe806..95756c935b9c3 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/client.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/client.rs @@ -44,17 +44,17 @@ use ironrdp_pdu::rdp::capability_sets::MajorPlatformType; use ironrdp_pdu::rdp::client_info::PerformanceFlags; use ironrdp_pdu::rdp::RdpError; use ironrdp_pdu::write_buf::WriteBuf; -use ironrdp_pdu::PduResult; use ironrdp_pdu::{custom_err, function, PduError}; +use ironrdp_pdu::{encode_err, encode_vec, EncodeError, PduResult}; use ironrdp_rdpdr::pdu::efs::ClientDeviceListAnnounce; use ironrdp_rdpdr::pdu::RdpdrPdu; use ironrdp_rdpdr::Rdpdr; -use ironrdp_rdpsnd::Rdpsnd; -use ironrdp_session::x224::{self, ProcessorOutput}; +use ironrdp_rdpsnd::client::{NoopRdpsndBackend, Rdpsnd}; +use ironrdp_session::x224::{self, DisconnectDescription, ProcessorOutput}; use ironrdp_session::SessionErrorKind::Reason; use ironrdp_session::{reason_err, SessionError, SessionResult}; use ironrdp_svc::{SvcMessage, SvcProcessor, SvcProcessorMessages}; -use ironrdp_tokio::{single_sequence_step_read, Framed, TokioStream}; +use ironrdp_tokio::{single_sequence_step_read, Framed, FramedWrite, TokioStream}; use log::debug; use rand::{Rng, SeedableRng}; use std::fmt::{Debug, Display, Formatter}; @@ -109,7 +109,7 @@ impl Client { pub fn run( cgo_handle: CgoHandle, params: ConnectParams, - ) -> ClientResult> { + ) -> ClientResult> { global::TOKIO_RT.block_on(async { Self::connect(cgo_handle, params) .await? @@ -183,7 +183,7 @@ impl Client { let mut connector = ironrdp_connector::ClientConnector::new(connector_config.clone()) .with_server_addr(server_socket_addr) .with_static_channel(drdynvc_client) // require for resizing - .with_static_channel(Rdpsnd::new()) // required for rdpdr to work + .with_static_channel(Rdpsnd::new(Box::new(NoopRdpsndBackend {}))) // required for rdpdr to work .with_static_channel(rdpdr); // required for smart card + directory sharing if params.allow_clipboard { @@ -268,7 +268,7 @@ impl Client { /// which it then executes. /// /// When either loop returns, the other is aborted and the result is returned. - async fn run_loops(mut self) -> ClientResult> { + async fn run_loops(mut self) -> ClientResult> { let read_stream = self .read_stream .take() @@ -323,7 +323,7 @@ impl Client { mut read_stream: RdpReadStream, x224_processor: Arc>, write_requester: ClientHandle, - ) -> tokio::task::JoinHandle>> { + ) -> tokio::task::JoinHandle>> { global::TOKIO_RT.spawn(async move { loop { let (action, mut frame) = read_stream.read_pdu().await?; @@ -363,8 +363,9 @@ impl Client { &mut read_stream, sequence.as_mut(), &mut buf, + None, ) - .await?; + .await?; if written.size().is_some() { write_requester @@ -519,7 +520,8 @@ impl Client { height, None, Some((width, height)), - )? + ) + .map_err(|e| encode_err!(e))? .into(); return Ok(vec![Box::new(pdu)]); } @@ -671,7 +673,7 @@ impl Client { event: FastPathInputEvent, ) -> ClientResult<()> { write_stream - .write_all(&ironrdp_pdu::encode_vec(&FastPathInput(vec![event]))?) + .write_all(&encode_vec(&FastPathInput(vec![event]))?) .await?; Ok(()) } @@ -1393,7 +1395,7 @@ fn create_config(params: &ConnectParams, pin: String, cgo_handle: CgoHandle) -> }, enable_tls: true, enable_credssp: false, - credentials: Credentials::SmartCard { pin }, + credentials: Credentials::SmartCard { pin, config: None }, domain: None, // Windows 10, Version 1909, same as FreeRDP as of October 5th, 2021. // This determines which Smart Card Redirection dialect we use per @@ -1417,6 +1419,7 @@ fn create_config(params: &ConnectParams, pin: String, cgo_handle: CgoHandle) -> no_server_pointer: false, autologon: true, pointer_software_rendering: false, + request_data: None, performance_flags: PerformanceFlags::default() | PerformanceFlags::DISABLE_CURSOR_SHADOW // this is required for pointer to work correctly in Windows 2019 | if !params.show_desktop_wallpaper { @@ -1447,6 +1450,7 @@ pub struct ConnectParams { pub enum ClientError { Tcp(IoError), Rdp(RdpError), + EncodeError(EncodeError), PduError(PduError), SessionError(SessionError), ConnectorError(ConnectorError), @@ -1480,6 +1484,7 @@ impl Display for ClientError { ClientError::SendError(msg) => Display::fmt(&msg.to_string(), f), ClientError::InternalError(msg) => Display::fmt(&msg.to_string(), f), ClientError::UnknownAddress => Display::fmt("Unknown address", f), + ClientError::EncodeError(e) => Display::fmt(e, f), ClientError::PduError(e) => Display::fmt(e, f), #[cfg(feature = "fips")] ClientError::ErrorStack(e) => Display::fmt(e, f), @@ -1531,6 +1536,12 @@ impl From for ClientError { } } +impl From for ClientError { + fn from(e: EncodeError) -> Self { + ClientError::EncodeError(e) + } +} + impl From for ClientError { fn from(e: PduError) -> Self { ClientError::PduError(e) diff --git a/lib/srv/desktop/rdp/rdpclient/src/lib.rs b/lib/srv/desktop/rdp/rdpclient/src/lib.rs index 44f29dc4700ce..4bdf1096853b8 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/lib.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/lib.rs @@ -28,6 +28,7 @@ use crate::client::global::get_client_handle; use crate::client::Client; use crate::rdpdr::tdp::SharedDirectoryAnnounce; use client::{ClientHandle, ClientResult, ConnectParams}; +use ironrdp_session::x224::DisconnectDescription; use log::{error, trace, warn}; use rdpdr::path::UnixPath; use rdpdr::tdp::{ @@ -109,9 +110,16 @@ pub unsafe extern "C" fn client_run(cgo_handle: CgoHandle, params: CGOConnectPar Ok(res) => CGOResult { err_code: CGOErrCode::ErrCodeSuccess, message: match res { - Some(reason) => CString::new(reason.description().to_string()) - .map(|c| c.into_raw()) - .unwrap_or(ptr::null_mut()), + Some(DisconnectDescription::McsDisconnect(reason)) => { + CString::new(reason.description().to_string()) + .map(|c| c.into_raw()) + .unwrap_or(ptr::null_mut()) + } + Some(DisconnectDescription::ErrorInfo(info)) => { + CString::new(info.description().to_string()) + .map(|c| c.into_raw()) + .unwrap_or(ptr::null_mut()) + } None => ptr::null_mut(), }, }, diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs index 1dbeaa24f8239..b082eb40679a8 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs @@ -34,7 +34,7 @@ use ironrdp_rdpdr::pdu::efs::{ }; use ironrdp_rdpdr::pdu::esc::{ScardCall, ScardIoCtlCode}; use ironrdp_rdpdr::RdpdrBackend; -use ironrdp_svc::impl_as_any; +use ironrdp_svc::{impl_as_any, SvcMessage}; #[derive(Debug)] pub struct TeleportRdpdrBackend { @@ -79,12 +79,13 @@ impl RdpdrBackend for TeleportRdpdrBackend { self.scard.handle(req, call) } - fn handle_drive_io_request(&mut self, req: ServerDriveIoRequest) -> PduResult<()> { + fn handle_drive_io_request(&mut self, req: ServerDriveIoRequest) -> PduResult> { // If directory sharing isn't enabled, we don't advertise drive redirection as a supported // feature, so we should never receive a drive IO request. However this check acts as a // safeguard in case of a server bug or some other anomalous behavior. if self.allow_directory_sharing { - self.fs.handle_rdp_drive_io_request(req) + self.fs.handle_rdp_drive_io_request(req)?; + Ok(vec![]) } else { Err(custom_err!(TeleportRdpdrBackendError( "Received a directory sharing PDU but directory sharing is not enabled".to_string() diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs index a954af5d0571e..b123e48e64f44 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs @@ -18,13 +18,16 @@ use super::{ path::UnixPath, tdp::{self, TdpErrCode}, }; +use crate::client::{ClientError, ClientResult}; use crate::{ cgo_tdp_sd_acknowledge, cgo_tdp_sd_create_request, cgo_tdp_sd_delete_request, cgo_tdp_sd_info_request, cgo_tdp_sd_list_request, cgo_tdp_sd_move_request, cgo_tdp_sd_read_request, cgo_tdp_sd_truncate_request, cgo_tdp_sd_write_request, client::ClientHandle, CGOErrCode, CgoHandle, }; -use ironrdp_pdu::{cast_length, custom_err, other_err, PduResult}; +use ironrdp_pdu::{ + cast_length, custom_err, other_err, EncodeError, PduError, PduErrorExt, PduResult, +}; use ironrdp_rdpdr::pdu::{ self, efs::{self, NtStatus}, @@ -33,6 +36,17 @@ use ironrdp_rdpdr::pdu::{ use log::{debug, warn}; use std::collections::HashMap; use std::convert::TryInto; +use std::fmt::Debug; + +pub(crate) fn cast_length>( + ctx: &str, + field: &str, + s: S, +) -> ClientResult { + s.try_into().map_err(|e| { + ClientError::InternalError(format!("{}: can't convert {}: {:?}", ctx, field, e)) + }) +} /// `FilesystemBackend` implements the filesystem redirection backend as described in [\[MS-RDPEFS\]: Remote Desktop Protocol: File System Virtual Channel Extension]. /// It does so in concert with the TDP directory sharing extension described in [RFD 0067]. @@ -470,7 +484,8 @@ impl FilesystemBackend { "FilesystemBackend::handle_query_volume_req", "dir.fso.last_modified", dir.fso.last_modified - )?, + ) + .map_err(|e: EncodeError| ClientError::from(e))?, // Equivalent to `u32::MAX & 0xffff` which is what FreeRDP does between // https://github.com/FreeRDP/FreeRDP/blob/511444a65e7aa2f537c5e531fa68157a50c1bd4d/winpr/libwinpr/file/file.c#L1018-L1021 // https://github.com/FreeRDP/FreeRDP/blob/511444a65e7aa2f537c5e531fa68157a50c1bd4d/channels/drive/client/drive_main.c#L492 @@ -873,7 +888,7 @@ impl FilesystemBackend { completion_id: rdp_req.device_io_request.completion_id, directory_id: rdp_req.device_io_request.device_id, path: file.path.clone(), - end_of_file: cast_length!("end_of_file", end_of_file)?, + end_of_file: cast_length("tdp_sd_truncate", "end_of_file", end_of_file)?, })?; self.pending_sd_truncate_resp_handlers.insert( @@ -891,7 +906,8 @@ impl FilesystemBackend { this.file_cache.get_mut(rdp_req.device_io_request.file_id) { // Truncate succeeded, update our internal books to reflect the new size. - file.fso.size = cast_length!("end_of_file", end_of_file)?; + file.fso.size = + cast_length("tdp_sd_truncate", "end_of_file", end_of_file)?; io_status } else { // This shouldn't happen. @@ -1364,10 +1380,10 @@ impl FilesystemBackend { device_io_response: efs::DeviceIoResponse, file: &FileCacheObject, ) -> PduResult<()> { - let file_fso_size: i64 = cast_length!( + let file_fso_size: i64 = cast_length( "FilesystemBackend::send_file_standard_info", "file.fso.size", - file.fso.size + file.fso.size, )?; self.client_handle.write_rdpdr( @@ -1586,8 +1602,11 @@ impl FilesystemBackend { req: &efs::ServerDriveSetInformationRequest, io_status: NtStatus, ) -> PduResult<()> { - self.client_handle - .write_rdpdr(efs::ClientDriveSetInformationResponse::new(req, io_status)?.into())?; + self.client_handle.write_rdpdr( + efs::ClientDriveSetInformationResponse::new(req, io_status) + .map_err(|e| PduError::encode("send_rdp_set_info_response", e))? + .into(), + )?; Ok(()) } } diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs index 4cc1f32dec8f3..ca95ea60b2bbd 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs @@ -15,6 +15,7 @@ // along with this program. If not, see . use super::{filesystem::FileCacheObject, path::UnixPath}; +use crate::rdpdr::filesystem::cast_length; use crate::{ util::{self, from_c_string, from_go_array}, CGOSharedDirectoryAnnounce, CGOSharedDirectoryCreateRequest, CGOSharedDirectoryCreateResponse, @@ -23,7 +24,7 @@ use crate::{ CGOSharedDirectoryReadRequest, CGOSharedDirectoryReadResponse, CGOSharedDirectoryTruncateRequest, CGOSharedDirectoryWriteRequest, }; -use ironrdp_pdu::{cast_length, custom_err, PduResult}; +use ironrdp_pdu::{custom_err, PduResult}; use ironrdp_rdpdr::pdu::efs::{ self, DeviceCloseRequest, DeviceCreateRequest, DeviceReadRequest, DeviceWriteRequest, }; @@ -158,10 +159,10 @@ impl FileSystemObject { last_modified, last_modified, last_modified, - cast_length!( + cast_length( "FileSystemObject::into_both_directory", "self.size", - self.size + self.size, )?, file_attributes, self.name()?, @@ -182,10 +183,10 @@ impl FileSystemObject { last_modified, last_modified, last_modified, - cast_length!( + cast_length( "FileSystemObject::into_both_directory", "self.size", - self.size + self.size, )?, file_attributes, self.name()?, @@ -210,7 +211,7 @@ impl FileSystemObject { last_modified, last_modified, last_modified, - cast_length!("FileSystemObject::into_directory", "self.size", self.size)?, + cast_length("FileSystemObject::into_directory", "self.size", self.size)?, file_attributes, self.name()?, )) From ed9f9be58834ac89634cd352753afad6053e340a Mon Sep 17 00:00:00 2001 From: Przemko Robakowski Date: Tue, 11 Feb 2025 17:52:14 +0100 Subject: [PATCH 5/8] fix warnings --- Cargo.lock | 1 + lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 | 70 +++++ lib/srv/desktop/rdp/rdpclient/Cargo.toml | 1 + lib/srv/desktop/rdp/rdpclient/src/client.rs | 7 +- lib/srv/desktop/rdp/rdpclient/src/piv.rs | 36 ++- lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs | 29 +- .../rdp/rdpclient/src/rdpdr/filesystem.rs | 284 +++++++++++------- .../desktop/rdp/rdpclient/src/rdpdr/path.rs | 11 +- .../desktop/rdp/rdpclient/src/rdpdr/scard.rs | 64 ++-- .../desktop/rdp/rdpclient/src/rdpdr/tdp.rs | 18 +- 10 files changed, 348 insertions(+), 173 deletions(-) create mode 100644 lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 diff --git a/Cargo.lock b/Cargo.lock index 3498c3ba3fd4f..562d1d5355d03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2383,6 +2383,7 @@ dependencies = [ "env_logger", "ironrdp-cliprdr", "ironrdp-connector", + "ironrdp-core", "ironrdp-displaycontrol", "ironrdp-dvc", "ironrdp-pdu", diff --git a/lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 b/lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 new file mode 100644 index 0000000000000..6205d177fde96 --- /dev/null +++ b/lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 @@ -0,0 +1,70 @@ +#include +#include +#include +#include + +#define SCARD_DEVICE_ID 1 + +#define FALSE 0 + +#define TRUE 1 + +typedef enum CGOErrCode { + ErrCodeSuccess = 0, + ErrCodeFailure = 1, + ErrCodeClientPtr = 2, + ErrCodeNotFound = 3, +} CGOErrCode; + +typedef enum CGOPointerButton { + PointerButtonNone, + PointerButtonLeft, + PointerButtonRight, + PointerButtonMiddle, +} CGOPointerButton; + +typedef enum CGOPointerWheel { + PointerWheelNone, + PointerWheelVertical, + PointerWheelHorizontal, +} CGOPointerWheel; + +typedef enum FileType { + File = 0, + Directory = 1, +} FileType; + +typedef enum TdpErrCode { + /** + * nil (no error, operation succeeded) + */ + Nil = 0, + /** + * operation failed + */ + Failed = 1, + /** + * resource does not exist + */ + DoesNotExist = 2, + /** + * resource already exists + */ + AlreadyExists = 3, +} TdpErrCode; + +typedef struct CGOResult { + enum CGOErrCode err_code; + char *message; +} CGOResult; + +/** + * A [cgo.Handle] passed to us by Go. + * + * [cgo.Handle]: https://pkg.go.dev/runtime/cgo#Handle + */ +typedef uintptr_t CgoHandle; + +typedef struct CGOConnectParams { + const char *go_addr; + uint32_t cert_der_len; \ No newline at end of file diff --git a/lib/srv/desktop/rdp/rdpclient/Cargo.toml b/lib/srv/desktop/rdp/rdpclient/Cargo.toml index 838bac2439d10..cc9fe12c0e00a 100644 --- a/lib/srv/desktop/rdp/rdpclient/Cargo.toml +++ b/lib/srv/desktop/rdp/rdpclient/Cargo.toml @@ -16,6 +16,7 @@ bytes = "1.10.0" env_logger = "0.11.6" ironrdp-cliprdr.workspace = true ironrdp-connector.workspace = true +ironrdp-core.workspace = true ironrdp-pdu.workspace = true ironrdp-rdpdr.workspace = true ironrdp-rdpsnd.workspace = true diff --git a/lib/srv/desktop/rdp/rdpclient/src/client.rs b/lib/srv/desktop/rdp/rdpclient/src/client.rs index 95756c935b9c3..d6db7d1d052cd 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/client.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/client.rs @@ -39,13 +39,12 @@ use ironrdp_pdu::input::fast_path::{ }; use ironrdp_pdu::input::mouse::PointerFlags; use ironrdp_pdu::input::{InputEventError, MousePdu}; -use ironrdp_pdu::mcs::DisconnectReason; use ironrdp_pdu::rdp::capability_sets::MajorPlatformType; use ironrdp_pdu::rdp::client_info::PerformanceFlags; use ironrdp_pdu::rdp::RdpError; use ironrdp_pdu::write_buf::WriteBuf; -use ironrdp_pdu::{custom_err, function, PduError}; use ironrdp_pdu::{encode_err, encode_vec, EncodeError, PduResult}; +use ironrdp_pdu::{function, pdu_other_err, PduError}; use ironrdp_rdpdr::pdu::efs::ClientDeviceListAnnounce; use ironrdp_rdpdr::pdu::RdpdrPdu; use ironrdp_rdpdr::Rdpdr; @@ -507,7 +506,7 @@ impl Client { debug!("DisplayControlClient channel opened"); // We've been notified that the DisplayControl dvc channel has been opened: let mut pending_resize = - Self::resize_manager_lock(pending_resize).map_err(|err| custom_err!(err))?; + Self::resize_manager_lock(pending_resize).map_err(ClientError::from)?; let pending_resize = pending_resize.pending_resize.take(); if let Some((width, height)) = pending_resize { // If there was a resize pending, perform it now. @@ -1550,7 +1549,7 @@ impl From for ClientError { impl From for PduError { fn from(e: ClientError) -> Self { - custom_err!(e) + pdu_other_err!("", source:e) } } diff --git a/lib/srv/desktop/rdp/rdpclient/src/piv.rs b/lib/srv/desktop/rdp/rdpclient/src/piv.rs index 8c7b2e4a10ac5..29a2c02a5daab 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/piv.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/piv.rs @@ -15,7 +15,7 @@ // along with this program. If not, see . use crate::rdpdr::TeleportRdpdrBackendError; -use ironrdp_pdu::{custom_err, other_err, PduResult}; +use ironrdp_pdu::{pdu_other_err, PduResult}; use iso7816::aid::Aid; use iso7816::command::instruction::Instruction; use iso7816::command::Command; @@ -58,7 +58,7 @@ pub struct Card { impl Card { pub fn new(uuid: Uuid, cert_der: &[u8], key_der: &[u8], pin: String) -> PduResult { let piv_auth_key = RsaPrivateKey::from_pkcs1_der(key_der) - .map_err(|_e| other_err!("failed to parse private key from DER"))?; + .map_err(|_e| pdu_other_err!("failed to parse private key from DER"))?; Ok(Self { chuid: Self::build_chuid(uuid), @@ -79,7 +79,7 @@ impl Card { None => cmd, Some(pending) => { pending.extend_from_command(&cmd).map_err(|e| { - custom_err!(TeleportRdpdrBackendError(format!( + pdu_other_err!("", source: TeleportRdpdrBackendError(format!( "could not build chained command: {e:?}" ))) })?; @@ -158,8 +158,9 @@ impl Card { if cmd.p1 != 0x3F && cmd.p2 != 0xFF { return Ok(Response::new(Status::NotFound)); } - let request_tlv = Tlv::from_bytes(cmd.data()) - .map_err(|e| custom_err!(TeleportRdpdrBackendError(format!("TLV invalid: {e:?}"))))?; + let request_tlv = Tlv::from_bytes(cmd.data()).map_err( + |e| pdu_other_err!("", source:TeleportRdpdrBackendError(format!("TLV invalid: {e:?}"))), + )?; if *request_tlv.tag() != tlv_tag(0x5C)? { return Ok(Response::new(Status::NotFound)); } @@ -189,7 +190,9 @@ impl Card { None => Ok(Response::new(Status::NotFound)), Some(cursor) => { let mut chunk = [0; CHUNK_SIZE]; - let n = cursor.read(&mut chunk).map_err(|e| custom_err!(e))?; + let n = cursor + .read(&mut chunk) + .map_err(|e| pdu_other_err!("", source:e))?; let mut chunk = chunk.to_vec(); chunk.truncate(n); let remaining = cursor.get_ref().len() as u64 - cursor.position(); @@ -237,23 +240,24 @@ impl Card { // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-78-4.pdf // TODO(zmb3): support non-RSA keys, if needed. if cmd.p1 != 0x07 { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "unsupported algorithm identifier P1:{:#X} in general authenticate command", cmd.p1 )))); } // P2='9A' means PIV Authentication Key (matches our cert '5FC105' in handle_get_data). if cmd.p2 != 0x9A { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "unsupported key reference P2:{:#X} in general authenticate command", cmd.p2 )))); } - let request_tlv = Tlv::from_bytes(cmd.data()) - .map_err(|e| custom_err!(TeleportRdpdrBackendError(format!("TLV invalid: {e:?}"))))?; + let request_tlv = Tlv::from_bytes(cmd.data()).map_err( + |e| pdu_other_err!("", source:TeleportRdpdrBackendError(format!("TLV invalid: {e:?}"))), + )?; if *request_tlv.tag() != tlv_tag(TLV_TAG_DYNAMIC_AUTHENTICATION_TEMPLATE)? { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "general authenticate command TLV invalid: {request_tlv:?}" )))); } @@ -261,7 +265,7 @@ impl Card { // Extract the challenge field. let request_tlvs = match request_tlv.value() { Value::Primitive(_) => { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "general authenticate command TLV invalid: {request_tlv:?}" )))); } @@ -275,14 +279,14 @@ impl Card { challenge = match data.value() { Value::Primitive(chal) => Some(chal), Value::Constructed(_) => { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "general authenticate command TLV invalid: {request_tlv:?}" )))); } }; } let challenge = challenge.ok_or_else(|| { - custom_err!(TeleportRdpdrBackendError(format!( + pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "general authenticate command TLV invalid: {request_tlv:?}, missing challenge data" ))) })?; @@ -407,7 +411,7 @@ const TLV_TAG_RESPONSE: u8 = 0x82; fn tlv(tag: u8, value: Value) -> PduResult { Tlv::new(tlv_tag(tag)?, value).map_err(|e| { - custom_err!(TeleportRdpdrBackendError(format!( + pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "TLV with tag {tag:#X} invalid: {e:?}" ))) }) @@ -415,7 +419,7 @@ fn tlv(tag: u8, value: Value) -> PduResult { fn tlv_tag(val: u8) -> PduResult { Tag::try_from(val).map_err(|e| { - custom_err!(TeleportRdpdrBackendError(format!( + pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "TLV tag {val:#X} invalid: {e:?}" ))) }) diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs index b082eb40679a8..bf6c2e7ff6d51 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs @@ -28,13 +28,14 @@ use self::tdp::{ }; use crate::client::ClientHandle; use crate::CgoHandle; -use ironrdp_pdu::{custom_err, PduResult}; +use ironrdp_core::impl_as_any; +use ironrdp_pdu::{pdu_other_err, PduResult}; use ironrdp_rdpdr::pdu::efs::{ DeviceControlRequest, NtStatus, ServerDeviceAnnounceResponse, ServerDriveIoRequest, }; use ironrdp_rdpdr::pdu::esc::{ScardCall, ScardIoCtlCode}; use ironrdp_rdpdr::RdpdrBackend; -use ironrdp_svc::{impl_as_any, SvcMessage}; +use ironrdp_svc::SvcMessage; #[derive(Debug)] pub struct TeleportRdpdrBackend { @@ -56,10 +57,13 @@ impl RdpdrBackend for TeleportRdpdrBackend { // If the device announce for the smart card failed, return an error that will end the session. // Authentication is impossible without a smart card. if pdu.device_id == SCARD_DEVICE_ID && pdu.result_code != NtStatus::SUCCESS { - return Err(custom_err!(TeleportRdpdrBackendError(format!( - "ServerDeviceAnnounceResponse for smartcard failed with NtStatus: {:?}", - pdu.result_code - )))); + return Err(pdu_other_err!( + "", + source:TeleportRdpdrBackendError(format!( + "ServerDeviceAnnounceResponse for smartcard failed with NtStatus: {:?}", + pdu.result_code + )) + )); } // If the device announce is not for a smart card, assume it's for a directory @@ -81,15 +85,19 @@ impl RdpdrBackend for TeleportRdpdrBackend { fn handle_drive_io_request(&mut self, req: ServerDriveIoRequest) -> PduResult> { // If directory sharing isn't enabled, we don't advertise drive redirection as a supported - // feature, so we should never receive a drive IO request. However this check acts as a + // feature, so we should never receive a drive IO request. However, this check acts as a // safeguard in case of a server bug or some other anomalous behavior. if self.allow_directory_sharing { self.fs.handle_rdp_drive_io_request(req)?; Ok(vec![]) } else { - Err(custom_err!(TeleportRdpdrBackendError( - "Received a directory sharing PDU but directory sharing is not enabled".to_string() - ))) + Err(pdu_other_err!( + "", + source:TeleportRdpdrBackendError( + "Received a directory sharing PDU but directory sharing is not enabled" + .to_string() + ) + )) } } } @@ -168,6 +176,7 @@ impl TeleportRdpdrBackend { } /// A generic error type for the TeleportRdpdrBackend that can contain any arbitrary error message. +#[allow(dead_code)] #[derive(Debug)] pub struct TeleportRdpdrBackendError(pub String); diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs index b123e48e64f44..322e049a66fb1 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs @@ -25,9 +25,9 @@ use crate::{ cgo_tdp_sd_read_request, cgo_tdp_sd_truncate_request, cgo_tdp_sd_write_request, client::ClientHandle, CGOErrCode, CgoHandle, }; -use ironrdp_pdu::{ - cast_length, custom_err, other_err, EncodeError, PduError, PduErrorExt, PduResult, -}; +use ironrdp_core::{cast_length, EncodeError}; +use ironrdp_pdu::PduResult; +use ironrdp_pdu::{pdu_other_err, PduError, PduErrorExt}; use ironrdp_rdpdr::pdu::{ self, efs::{self, NtStatus}, @@ -178,10 +178,13 @@ impl FilesystemBackend { ) -> PduResult<()> { match res.err_code { TdpErrCode::Failed | TdpErrCode::AlreadyExists => { - return Err(custom_err!(FilesystemBackendError(format!( - "received unexpected TDP error code in SharedDirectoryInfoResponse: {:?}", - res.err_code, - )))); + return Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unexpected TDP error code in SharedDirectoryInfoResponse: {:?}", + res.err_code, + )) + )); } TdpErrCode::Nil => { // The file exists @@ -328,14 +331,17 @@ impl FilesystemBackend { } } _ => { - return Err(custom_err!(FilesystemBackendError(format!( - "received unknown CreateDisposition value for RDP {req:?}", - req = req - )))); + return Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unknown CreateDisposition value for RDP {req:?}", + req = req + )) + )); } } - Err(other_err!( + Err(pdu_other_err!( "Programmer error, this line should never be reached" )) } @@ -378,9 +384,7 @@ impl FilesystemBackend { ), Some(dir) => { if dir.fso.file_type != tdp::FileType::Directory { - return Err(other_err!( - "received ServerDriveQueryDirectoryRequest request for a file rather than a directory", - )); + return Err(pdu_other_err!("received ServerDriveQueryDirectoryRequest request for a file rather than a directory")); } if rdp_req.initial_query == 0 { @@ -431,10 +435,13 @@ impl FilesystemBackend { // For now any error will kill the session. // In the future, we might want to make this send back // an NTSTATUS::STATUS_UNSUCCESSFUL instead. - return Err(custom_err!(FilesystemBackendError(format!( - "SharedDirectoryListRequest failed with err_code = {:?}", - tdp_resp.err_code - )))); + return Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "SharedDirectoryListRequest failed with err_code = {:?}", + tdp_resp.err_code + )) + )); } // If SharedDirectoryListRequest succeeded, move the @@ -469,10 +476,13 @@ impl FilesystemBackend { ) -> PduResult<()> { match self.file_cache.get(rdp_req.device_io_request.file_id) { // File not found in cache - None => Err(custom_err!(FilesystemBackendError(format!( - "failed to retrieve an item from the file cache with FileId = {}", - rdp_req.device_io_request.file_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "failed to retrieve an item from the file cache with FileId = {}", + rdp_req.device_io_request.file_id + )) + )), Some(dir) => { let buffer: Option = match rdp_req .fs_info_class_lvl @@ -633,10 +643,13 @@ impl FilesystemBackend { // https://github.com/FreeRDP/FreeRDP/blob/dfa231c0a55b005af775b833f92f6bcd30363d77/channels/drive/client/drive_file.c#L579 self.send_rdp_set_info_response(&rdp_req, io_status) } - _ => Err(custom_err!(FilesystemBackendError(format!( - "received unsupported FileInformationClass value for RDP {:?}", - rdp_req - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unsupported FileInformationClass value for RDP {:?}", + rdp_req + )) + )), } } @@ -976,10 +989,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_acknowledge(self.cgo_handle, &mut tdp_req) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_acknowledge failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_acknowledge failed: {:?}", + err + )) + )), } } @@ -990,10 +1006,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_info_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_info_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_info_request failed: {:?}", + err + )) + )), } } @@ -1007,10 +1026,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_truncate_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_truncate_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_truncate_request failed: {:?}", + err + )) + )), } } @@ -1024,10 +1046,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_create_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_create_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_create_request failed: {:?}", + err + )) + )), } } @@ -1041,10 +1066,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_delete_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_delete_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_delete_request failed: {:?}", + err + )) + )), } } @@ -1055,10 +1083,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_list_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_list_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_list_request failed: {:?}", + err + )) + )), } } @@ -1069,10 +1100,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_read_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_read_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_read_request failed: {:?}", + err + )) + )), } } @@ -1086,10 +1120,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_write_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_write_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_write_request failed: {:?}", + err + )) + )), } } @@ -1100,10 +1137,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_move_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_move_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_move_request failed: {:?}", + err + )) + )), } } @@ -1120,10 +1160,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1140,10 +1183,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1160,10 +1206,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1180,10 +1229,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1200,10 +1252,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1220,10 +1275,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1236,10 +1294,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1252,10 +1313,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1282,7 +1346,7 @@ impl FilesystemBackend { { Ok(efs::Information::FILE_OVERWRITTEN) } else { - Err(other_err!( + Err(pdu_other_err!( "program error, CreateDispositionFlags check should be exhaustive" )) }?; @@ -1341,10 +1405,13 @@ impl FilesystemBackend { efs::FileInformationClassLevel::FILE_ATTRIBUTE_TAG_INFORMATION => { self.send_rdp_file_attr_tag_info(device_io_response, file) } - _ => Err(custom_err!(FilesystemBackendError(format!( - "received unsupported FileInformationClass: {:?}", - rdp_req.file_info_class_lvl - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unsupported FileInformationClass: {:?}", + rdp_req.file_info_class_lvl + )) + )), } } @@ -1481,10 +1548,13 @@ impl FilesystemBackend { Some(efs::FileInformationClass::Directory(fso.into_directory()?)) } _ => { - return Err(custom_err!(FilesystemBackendError(format!( - "received unsupported file information class level: {:?}", - req.file_info_class_lvl, - )))); + return Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unsupported file information class level: {:?}", + req.file_info_class_lvl, + )) + )); } }; @@ -1634,9 +1704,7 @@ impl FileCache { if self.cache.insert(self.next_file_id, file).is_none() { Ok(self.next_file_id) } else { - Err(other_err!( - "attempted to insert a FileCacheObject into the file cache with a file_id that already exists in the cache" - )) + Err(pdu_other_err!("attempted to insert a FileCacheObject into the file cache with a file_id that already exists in the cache")) } } @@ -1714,7 +1782,7 @@ impl FileCacheObject { /// FileCacheObject is used as an iterator for the implementation of /// IRP_MJ_DIRECTORY_CONTROL, which requires that we iterate through /// all the files of a directory one by one. In this case, the directory -/// is the FileCacheObject itself, with it's own fso field representing +/// is the FileCacheObject itself, with its own fso field representing /// the directory, and its contents being represented by tdp::FileSystemObject's /// in its contents field. /// diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/path.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/path.rs index eea417fc464be..fdff99feb1ebd 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/path.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/path.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -use ironrdp_pdu::{custom_err, PduResult}; +use ironrdp_pdu::{pdu_other_err, PduResult}; use std::ffi::CString; /// WindowsPath is a String that we assume to be in the form @@ -63,10 +63,10 @@ impl UnixPath { /// any characters that can't be handled by CString::new(). pub fn to_cstring(&self) -> PduResult { CString::new(self.path.clone()).map_err(|e| { - custom_err!(PathError(format!( - "Error converting UnixPath to CString: {}", - e - ))) + pdu_other_err!( + "", + source:PathError(format!("Error converting UnixPath to CString: {}", e)) + ) }) } @@ -139,6 +139,7 @@ fn crop_first_n_letters(s: &mut String, n: usize) { } } +#[allow(dead_code)] #[derive(Debug)] pub struct PathError(pub String); diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/scard.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/scard.rs index cb54d492d8fa4..f5e4acd4962fa 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/scard.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/scard.rs @@ -16,8 +16,9 @@ use crate::client::ClientHandle; use crate::{piv, util}; +use ironrdp_pdu::pdu_other_err; use ironrdp_pdu::utils::CharacterSet; -use ironrdp_pdu::{custom_err, other_err, PduResult}; +use ironrdp_pdu::PduResult; use ironrdp_rdpdr::pdu::efs::{DeviceControlRequest, DeviceControlResponse, NtStatus}; use ironrdp_rdpdr::pdu::esc::{ rpce, CardProtocol, CardState, CardStateFlags, ConnectCall, ConnectReturn, ContextCall, @@ -154,10 +155,13 @@ impl ScardBackend { ScardCall::GetReaderIconCall(_) => self.handle_get_reader_icon(req), _ => Self::unsupported_combo_error(req.io_control_code, call), }, - _ => Err(custom_err!(SmartcardBackendError(format!( - "received unhandled ScardIoCtlCode: {:?}", - req.io_control_code - )))), + _ => Err(pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "received unhandled ScardIoCtlCode: {:?}", + req.io_control_code + )) + )), }?; Ok(()) @@ -336,10 +340,13 @@ impl ScardBackend { ) -> PduResult<()> { let cmd = CardCommand::::try_from(&call.send_buffer).map_err(|err| { - custom_err!(SmartcardBackendError(format!( - "failed to parse smartcard command {:?}: {:?}", - &call.send_buffer, err - ))) + pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "failed to parse smartcard command {:?}: {:?}", + &call.send_buffer, err + )) + ) })?; let card = self.contexts.get_card(&call.handle)?; @@ -356,10 +363,13 @@ impl ScardBackend { ScardIoCtlCode::StatusW => CharacterSet::Unicode, ScardIoCtlCode::StatusA => CharacterSet::Ansi, _ => { - return Err(custom_err!(SmartcardBackendError(format!( - "got unexpected ScardIoCtlCode with a StatusCall: {:?}", - req.io_control_code - )))); + return Err(pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "got unexpected ScardIoCtlCode with a StatusCall: {:?}", + req.io_control_code + )) + )); } }; @@ -457,10 +467,13 @@ impl ScardBackend { GetDeviceTypeIdReturn::new(ReturnCode::Success, SCARD_READER_TYPE_VENDOR), ) } else { - Err(custom_err!(SmartcardBackendError(format!( - "got GetDeviceTypeIdCall for unknown context [{}]", - call.context.value - )))) + Err(pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "got GetDeviceTypeIdCall for unknown context [{}]", + call.context.value + )) + )) } } @@ -497,10 +510,13 @@ impl ScardBackend { /// This function returns the error for unsupported combinations of [`ScardIoCtlCode`] and [`ScardCall`]. fn unsupported_combo_error(ioctl: ScardIoCtlCode, call: ScardCall) -> PduResult<()> { - Err(custom_err!(SmartcardBackendError(format!( - "received unsupported combination of ScardIoCtlCode [{:?}] with ScardCall [{:?}]", - ioctl, call - )))) + Err(pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "received unsupported combination of ScardIoCtlCode [{:?}] with ScardCall [{:?}]", + ioctl, call + )) + )) } fn send_device_control_response( @@ -570,7 +586,7 @@ impl Contexts { fn get_card(&mut self, handle: &ScardHandle) -> PduResult<&mut piv::Card> { self.get_internal_mut(handle.context.value)? .get(handle.value) - .ok_or_else(|| other_err!("unknown ScardHandle")) + .ok_or_else(|| pdu_other_err!("unknown ScardHandle")) } fn exists(&self, id: u32) -> bool { @@ -592,7 +608,7 @@ impl Contexts { fn get_internal_mut(&mut self, id: u32) -> PduResult<&mut ContextInternal> { self.contexts .get_mut(&id) - .ok_or_else(|| other_err!("unknown context id")) + .ok_or_else(|| pdu_other_err!("unknown context id")) } fn release(&mut self, id: u32) { @@ -627,7 +643,7 @@ impl ContextInternal { fn set_scard_cancel_response(&mut self, resp: DeviceControlResponse) -> PduResult<()> { if self.scard_cancel_response.is_some() { - return Err(other_err!("SCARD_IOCTL_CANCEL already received",)); + return Err(pdu_other_err!("SCARD_IOCTL_CANCEL already received",)); } self.scard_cancel_response = Some(resp); Ok(()) diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs index ca95ea60b2bbd..34cbccfd5aed8 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs @@ -24,11 +24,13 @@ use crate::{ CGOSharedDirectoryReadRequest, CGOSharedDirectoryReadResponse, CGOSharedDirectoryTruncateRequest, CGOSharedDirectoryWriteRequest, }; -use ironrdp_pdu::{custom_err, PduResult}; + +use ironrdp_pdu::pdu_other_err; +use ironrdp_pdu::PduResult; use ironrdp_rdpdr::pdu::efs::{ self, DeviceCloseRequest, DeviceCreateRequest, DeviceReadRequest, DeviceWriteRequest, }; -use std::convert::TryInto; + use std::ffi::CString; /// SharedDirectoryAnnounce is sent by the TDP client to the server @@ -138,10 +140,13 @@ impl FileSystemObject { if let Some(name) = self.path.last() { Ok(name.to_string()) } else { - Err(custom_err!(TdpHandlingError(format!( - "failed to extract name from path: {:?}", - self.path - )))) + Err(pdu_other_err!( + "", + source:TdpHandlingError(format!( + "failed to extract name from path: {:?}", + self.path + )) + )) } } @@ -701,6 +706,7 @@ pub(crate) fn to_windows_time(tdp_time_ms: u64) -> i64 { /// A generic error type that can contain any arbitrary error message. /// /// TODO: This is a temporary solution until we can figure out a better error handling system. +#[allow(dead_code)] #[derive(Debug)] pub struct TdpHandlingError(pub String); From e54f39ac687be4477f04a83eefb3cc4597f8c7f3 Mon Sep 17 00:00:00 2001 From: Przemko Robakowski Date: Tue, 11 Feb 2025 18:12:42 +0100 Subject: [PATCH 6/8] fix logging --- lib/srv/desktop/rdp/rdpclient/client.go | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/srv/desktop/rdp/rdpclient/client.go b/lib/srv/desktop/rdp/rdpclient/client.go index e2061ab569086..e0498f4fd5395 100644 --- a/lib/srv/desktop/rdp/rdpclient/client.go +++ b/lib/srv/desktop/rdp/rdpclient/client.go @@ -797,37 +797,37 @@ func cgo_write_rdp_license(handle C.uintptr_t, req *C.CGOLicenseRequest, data *C } func (c *Client) readRDPLicense(ctx context.Context, key types.RDPLicenseKey) ([]byte, error) { - log := c.cfg.Logger.With( - "issuer", key.Issuer, - "company", key.Company, - "version", key.Version, - "product", key.ProductID, - ) + log := c.cfg.Log.WithFields(logrus.Fields{ + "issuer": key.Issuer, + "company": key.Company, + "version": key.Version, + "product": key.ProductID, + }) license, err := c.cfg.LicenseStore.ReadRDPLicense(ctx, &key) switch { case trace.IsNotFound(err): - log.InfoContext(ctx, "existing RDP license not found") + log.Info("existing RDP license not found") case err != nil: - log.ErrorContext(ctx, "could not look up existing RDP license", "error", err) + log.Error("could not look up existing RDP license", "error", err) case len(license) > 0: - log.InfoContext(ctx, "found existing RDP license") + log.Info("found existing RDP license") } return license, trace.Wrap(err) } func (c *Client) writeRDPLicense(ctx context.Context, key types.RDPLicenseKey, license []byte) error { - log := c.cfg.Logger.With( - "issuer", key.Issuer, - "company", key.Company, - "version", key.Version, - "product", key.ProductID, - ) - log.InfoContext(ctx, "writing RDP license to storage") + log := c.cfg.Log.WithFields(logrus.Fields{ + "issuer": key.Issuer, + "company": key.Company, + "version": key.Version, + "product": key.ProductID, + }) + log.Info("writing RDP license to storage") err := c.cfg.LicenseStore.WriteRDPLicense(ctx, &key, license) if err != nil { - log.ErrorContext(ctx, "could not write RDP license", "error", err) + log.Error("could not write RDP license", "error", err) } return trace.Wrap(err) } From c02da9b36abded392e348b99610ca9ab2c36d32d Mon Sep 17 00:00:00 2001 From: Przemko Robakowski Date: Tue, 11 Feb 2025 19:59:40 +0100 Subject: [PATCH 7/8] cleanup --- lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 | 70 ------------------------ 1 file changed, 70 deletions(-) delete mode 100644 lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 diff --git a/lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 b/lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 deleted file mode 100644 index 6205d177fde96..0000000000000 --- a/lib/srv/desktop/rdp/rdpclient/.tmpDdVeH5 +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include - -#define SCARD_DEVICE_ID 1 - -#define FALSE 0 - -#define TRUE 1 - -typedef enum CGOErrCode { - ErrCodeSuccess = 0, - ErrCodeFailure = 1, - ErrCodeClientPtr = 2, - ErrCodeNotFound = 3, -} CGOErrCode; - -typedef enum CGOPointerButton { - PointerButtonNone, - PointerButtonLeft, - PointerButtonRight, - PointerButtonMiddle, -} CGOPointerButton; - -typedef enum CGOPointerWheel { - PointerWheelNone, - PointerWheelVertical, - PointerWheelHorizontal, -} CGOPointerWheel; - -typedef enum FileType { - File = 0, - Directory = 1, -} FileType; - -typedef enum TdpErrCode { - /** - * nil (no error, operation succeeded) - */ - Nil = 0, - /** - * operation failed - */ - Failed = 1, - /** - * resource does not exist - */ - DoesNotExist = 2, - /** - * resource already exists - */ - AlreadyExists = 3, -} TdpErrCode; - -typedef struct CGOResult { - enum CGOErrCode err_code; - char *message; -} CGOResult; - -/** - * A [cgo.Handle] passed to us by Go. - * - * [cgo.Handle]: https://pkg.go.dev/runtime/cgo#Handle - */ -typedef uintptr_t CgoHandle; - -typedef struct CGOConnectParams { - const char *go_addr; - uint32_t cert_der_len; \ No newline at end of file From eb055df1115883f08414b9e1888de6e0c0d679d3 Mon Sep 17 00:00:00 2001 From: Przemko Robakowski Date: Wed, 12 Feb 2025 17:57:22 +0100 Subject: [PATCH 8/8] [v15] Update IronRDP --- .github/workflows/dependency-review.yaml | 46 +- Cargo.lock | 1763 +++++++++++------ Cargo.toml | 27 +- lib/srv/desktop/rdp/rdpclient/Cargo.toml | 26 +- lib/srv/desktop/rdp/rdpclient/src/client.rs | 44 +- lib/srv/desktop/rdp/rdpclient/src/lib.rs | 14 +- lib/srv/desktop/rdp/rdpclient/src/piv.rs | 36 +- lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs | 33 +- .../rdp/rdpclient/src/rdpdr/filesystem.rs | 313 +-- .../desktop/rdp/rdpclient/src/rdpdr/path.rs | 10 +- .../desktop/rdp/rdpclient/src/rdpdr/scard.rs | 64 +- .../desktop/rdp/rdpclient/src/rdpdr/tdp.rs | 28 +- 12 files changed, 1583 insertions(+), 821 deletions(-) diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml index 34f9e6d9ce6ed..71c9fd97dc591 100644 --- a/.github/workflows/dependency-review.yaml +++ b/.github/workflows/dependency-review.yaml @@ -17,11 +17,49 @@ jobs: # Teleport version. allow-ghsas: 'GHSA-xwh9-gc39-5298,GHSA-6xf3-5hp7-xqqg' allow-dependencies-licenses: >- + pkg:cargo/ironrdp-cliprdr, + pkg:cargo/ironrdp-core, + pkg:cargo/ironrdp-async, + pkg:cargo/ironrdp-connector, + pkg:cargo/ironrdp-displaycontrol, + pkg:cargo/ironrdp-dvc, + pkg:cargo/ironrdp-error, + pkg:cargo/ironrdp-graphics, + pkg:cargo/ironrdp-pdu, + pkg:cargo/ironrdp-rdpdr, + pkg:cargo/ironrdp-rdpsnd, + pkg:cargo/ironrdp-session, + pkg:cargo/ironrdp-svc, + pkg:cargo/ironrdp-tokio, + pkg:cargo/ironrdp-tls, + pkg:cargo/asn1-rs, + pkg:cargo/asn1-rs-derive, + pkg:cargo/asn1-rs-impl, pkg:cargo/curve25519-dalek-derive, + pkg:cargo/der-parser, + pkg:cargo/icu_collections, + pkg:cargo/icu_locid, + pkg:cargo/icu_locid_transform, + pkg:cargo/icu_locid_transform_data, + pkg:cargo/icu_normalizer, + pkg:cargo/icu_normalizer_data, + pkg:cargo/icu_properties, + pkg:cargo/icu_properties_data, + pkg:cargo/icu_provider, + pkg:cargo/icu_provider_macros, + pkg:cargo/litemap, + pkg:cargo/openssl-probe, pkg:cargo/ring, pkg:cargo/sspi, pkg:cargo/tokio-boring, - pkg:cargo/asn1-rs, - pkg:cargo/asn1-rs-derive, - pkg:cargo/asn1-rs-impl, - pkg:cargo/der-parser + pkg:cargo/tokio-rustls, + pkg:cargo/unicode-ident, + pkg:cargo/writeable, + pkg:cargo/yoke, + pkg:cargo/yoke-derive, + pkg:cargo/zerofrom, + pkg:cargo/zerofrom-derive, + pkg:cargo/zerovec, + pkg:cargo/zerovec-derive, + pkg:npm/cspell/dict-en-common-misspellings, + pkg:npm/prettier diff --git a/Cargo.lock b/Cargo.lock index 7dfdc2015edc0..562d1d5355d03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,28 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "aead" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] [[package]] name = "aes" @@ -28,6 +38,29 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "aes-kw" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69fa2b352dcefb5f7f3a5fb840e02665d311d878955380515e4fd50095dd3d8c" +dependencies = [ + "aes", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -37,11 +70,61 @@ dependencies = [ "memchr", ] +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +dependencies = [ + "anstyle", + "once_cell", + "windows-sys 0.59.0", +] + [[package]] name = "asn1-rs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -54,13 +137,13 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", "synstructure", ] @@ -72,14 +155,14 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "async-dnssd" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98efc05996cc8d660e88841fcffb75aa71be5339c9ae559a8c8016c048420b82" +checksum = "3d49ffe175ab45bbfd74b548313d9d7cdfff27161a94b007b52eeeb5f9aaa15e" dependencies = [ "bitflags 1.3.2", "futures-channel", @@ -102,7 +185,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -120,30 +203,55 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", "winapi", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "aws-lc-rs" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2b7ddaa2c56a367ad27a094ad8ef4faacf8a617c2575acb2ba88949df999ca" +dependencies = [ + "aws-lc-sys", + "paste", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "71b2ddd3ada61a305e1d8bb6c005d1eaa7d14d903681edfc400406d523a9b491" +dependencies = [ + "bindgen 0.69.5", + "cc", + "cmake", + "dunce", + "fs_extra", + "paste", +] [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -154,9 +262,9 @@ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" @@ -170,7 +278,7 @@ version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cexpr", "clang-sys", "lazy_static", @@ -181,7 +289,30 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.68", + "syn 2.0.96", +] + +[[package]] +name = "bindgen" +version = "0.69.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +dependencies = [ + "bitflags 2.8.0", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.96", + "which", ] [[package]] @@ -198,9 +329,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "bitvec" @@ -234,10 +365,10 @@ dependencies = [ [[package]] name = "boring" -version = "4.4.0" -source = "git+https://github.com/gravitational/boring?rev=605253d99d5e363e178bcf97e1d4622e33844cd5#605253d99d5e363e178bcf97e1d4622e33844cd5" +version = "4.7.0" +source = "git+https://github.com/gravitational/boring?rev=99897308abb5976ea05625b8314c24b16eebb01b#99897308abb5976ea05625b8314c24b16eebb01b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "boring-sys", "foreign-types", "libc", @@ -246,10 +377,10 @@ dependencies = [ [[package]] name = "boring-sys" -version = "4.4.0" -source = "git+https://github.com/gravitational/boring?rev=605253d99d5e363e178bcf97e1d4622e33844cd5#605253d99d5e363e178bcf97e1d4622e33844cd5" +version = "4.7.0" +source = "git+https://github.com/gravitational/boring?rev=99897308abb5976ea05625b8314c24b16eebb01b#99897308abb5976ea05625b8314c24b16eebb01b" dependencies = [ - "bindgen", + "bindgen 0.68.1", "cmake", "fs_extra", "fslock", @@ -257,9 +388,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" @@ -269,9 +400,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "cbc" @@ -290,7 +421,7 @@ checksum = "da6bc11b07529f16944307272d5bd9b22530bc7d05751717c9d416586cedab49" dependencies = [ "clap", "heck", - "indexmap 1.9.3", + "indexmap", "log", "proc-macro2", "quote", @@ -303,9 +434,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.102" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779e6b7d17797c0b42023d417228c02889300190e700cb074c3438d9c541d332" +checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +dependencies = [ + "jobserver", + "libc", + "shlex", +] [[package]] name = "cexpr" @@ -358,7 +494,7 @@ dependencies = [ "atty", "bitflags 1.3.2", "clap_lex", - "indexmap 1.9.3", + "indexmap", "strsim", "termcolor", "textwrap", @@ -375,13 +511,19 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.50" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +checksum = "e24a03c8b52922d68a1589ad61032f2c1aa5a8158d2aa0d93c6e9534944bbad6" dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -400,9 +542,9 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" dependencies = [ "core-foundation-sys", "libc", @@ -410,24 +552,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "critical-section" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crypto" @@ -457,19 +599,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", + "rand_core", "typenum", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array", "subtle", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + [[package]] name = "curve25519-dalek" version = "4.1.3" @@ -494,7 +646,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -534,13 +686,13 @@ dependencies = [ [[package]] name = "der_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049" +checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -581,9 +733,15 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "ecdsa" version = "0.16.9" @@ -623,6 +781,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + [[package]] name = "elliptic-curve" version = "0.13.8" @@ -645,48 +809,43 @@ dependencies = [ ] [[package]] -name = "encoding_rs" -version = "0.8.34" +name = "env_filter" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ - "cfg-if", + "log", + "regex", ] [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "fastrand" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "ff" @@ -706,9 +865,9 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "flagset" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" +checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" [[package]] name = "fnv" @@ -734,7 +893,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -776,9 +935,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -791,9 +950,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -801,15 +960,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -818,38 +977,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -883,21 +1042,43 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "group" @@ -910,25 +1091,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 2.2.6", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "hash32" version = "0.2.1" @@ -944,12 +1106,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - [[package]] name = "heapless" version = "0.7.17" @@ -979,10 +1135,10 @@ dependencies = [ ] [[package]] -name = "hermit-abi" -version = "0.3.9" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" @@ -1002,11 +1158,20 @@ dependencies = [ "digest", ] +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "http" -version = "0.2.12" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1015,26 +1180,32 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", - "pin-project-lite", ] [[package]] -name = "httparse" -version = "1.9.4" +name = "http-body-util" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] [[package]] -name = "httpdate" -version = "1.0.3" +name = "httparse" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "humantime" @@ -1044,133 +1215,271 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.29" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2", + "smallvec", "tokio", - "tower-service", - "tracing", "want", ] [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http", "hyper", + "hyper-util", "rustls", + "rustls-pki-types", "tokio", "tokio-rustls", + "tower-service", ] [[package]] -name = "idna" -version = "0.5.0" +name = "hyper-util" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", ] [[package]] -name = "indexmap" -version = "1.9.3" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ - "autocfg", - "hashbrown 0.12.3", + "displaydoc", + "yoke", + "zerofrom", + "zerovec", ] [[package]] -name = "indexmap" -version = "2.2.6" +name = "icu_locid" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ - "equivalent", - "hashbrown 0.14.5", + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", ] [[package]] -name = "inout" -version = "0.1.3" +name = "icu_locid_transform" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" dependencies = [ - "block-padding", - "generic-array", + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "instant" -version = "0.1.13" +name = "icu_locid_transform_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ - "cfg-if", + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", ] [[package]] -name = "ipnet" -version = "2.9.0" +name = "icu_normalizer_data" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" [[package]] -name = "ironrdp" -version = "0.1.0" +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ - "console_error_panic_hook", - "getrandom", - "ironrdp-graphics", - "ironrdp-pdu", - "ironrdp-session", - "js-sys", - "log", - "time", - "tracing", - "tracing-subscriber", - "tracing-web", - "wasm-bindgen", - "web-sys", + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "ironrdp-async" +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "ironrdp" version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +dependencies = [ + "console_error_panic_hook", + "getrandom 0.2.15", + "ironrdp-graphics", + "ironrdp-pdu", + "ironrdp-session", + "js-sys", + "log", + "time", + "tracing", + "tracing-subscriber", + "tracing-web", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "ironrdp-async" +version = "0.2.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "bytes", "ironrdp-connector", + "ironrdp-core", "ironrdp-pdu", "tracing", ] [[package]] name = "ironrdp-cliprdr" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", + "ironrdp-core", "ironrdp-pdu", "ironrdp-svc", "thiserror", @@ -1179,24 +1488,36 @@ dependencies = [ [[package]] name = "ironrdp-connector" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.2.2" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ + "ironrdp-core", "ironrdp-error", "ironrdp-pdu", "ironrdp-svc", + "picky", + "picky-asn1-der", + "picky-asn1-x509", "rand_core", - "sspi 0.11.1", + "sspi", "tracing", "url", - "winapi", +] + +[[package]] +name = "ironrdp-core" +version = "0.1.2" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" +dependencies = [ + "ironrdp-error", ] [[package]] name = "ironrdp-displaycontrol" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ + "ironrdp-core", "ironrdp-dvc", "ironrdp-pdu", "ironrdp-svc", @@ -1205,9 +1526,10 @@ dependencies = [ [[package]] name = "ironrdp-dvc" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ + "ironrdp-core", "ironrdp-pdu", "ironrdp-svc", "slab", @@ -1216,19 +1538,19 @@ dependencies = [ [[package]] name = "ironrdp-error" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" [[package]] name = "ironrdp-graphics" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "bit_field", - "bitflags 2.6.0", + "bitflags 2.8.0", "bitvec", "byteorder", - "ironrdp-error", + "ironrdp-core", "ironrdp-pdu", "lazy_static", "num-derive", @@ -1238,13 +1560,14 @@ dependencies = [ [[package]] name = "ironrdp-pdu" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.2" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "bit_field", - "bitflags 2.6.0", + "bitflags 2.8.0", "byteorder", "der-parser", + "ironrdp-core", "ironrdp-error", "md-5", "num-bigint", @@ -1260,10 +1583,11 @@ dependencies = [ [[package]] name = "ironrdp-rdpdr" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", + "ironrdp-core", "ironrdp-error", "ironrdp-pdu", "ironrdp-svc", @@ -1272,19 +1596,23 @@ dependencies = [ [[package]] name = "ironrdp-rdpsnd" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ + "bitflags 2.8.0", + "ironrdp-core", "ironrdp-pdu", "ironrdp-svc", + "tracing", ] [[package]] name = "ironrdp-session" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.2.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "ironrdp-connector", + "ironrdp-core", "ironrdp-displaycontrol", "ironrdp-dvc", "ironrdp-error", @@ -1296,17 +1624,18 @@ dependencies = [ [[package]] name = "ironrdp-svc" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.2" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", + "ironrdp-core", "ironrdp-pdu", ] [[package]] name = "ironrdp-tls" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.1.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "tokio", "tokio-rustls", @@ -1315,8 +1644,8 @@ dependencies = [ [[package]] name = "ironrdp-tokio" -version = "0.1.0" -source = "git+https://github.com/Devolutions/IronRDP?rev=dfbe947e5b9bd2da06f1e14620ee4d68bca4252f#dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" +version = "0.2.1" +source = "git+https://github.com/Devolutions/IronRDP?rev=dd221bf22401c4635798ec012724cba7e6d503b2#dd221bf22401c4635798ec012724cba7e6d503b2" dependencies = [ "bytes", "ironrdp-async", @@ -1324,21 +1653,16 @@ dependencies = [ ] [[package]] -name = "is-terminal" -version = "0.4.12" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.52.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "iso7816" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3af73ac9c821e7aea3280532118e15cdf9e7bb45c923cbf0e319ae25b27d20c" +checksum = "c75f5d3f2d959c5d37b382ed9b5a32d0a0e6112ab6ac9eb8fce82359db6f2367" dependencies = [ "delog", "heapless", @@ -1353,18 +1677,37 @@ dependencies = [ "untrusted", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "jobserver" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1394,31 +1737,37 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -1432,9 +1781,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "md-5" @@ -1475,22 +1824,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", - "windows-sys 0.48.0", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", ] [[package]] @@ -1555,7 +1904,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -1588,21 +1937,11 @@ dependencies = [ "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - [[package]] name = "object" -version = "0.36.1" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -1618,15 +1957,21 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "os_str_bytes" @@ -1664,6 +2009,20 @@ dependencies = [ "sha2", ] +[[package]] +name = "p521" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc9e2161f1f215afdfce23677034ae137bbd45016a880c2eb3ba8eb95f085b2" +dependencies = [ + "base16ct", + "ecdsa", + "elliptic-curve", + "primeorder", + "rand_core", + "sha2", +] + [[package]] name = "parking_lot" version = "0.11.2" @@ -1707,11 +2066,17 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.8", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pbkdf2" version = "0.12.2" @@ -1746,24 +2111,36 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "picky" -version = "7.0.0-rc.8" +version = "7.0.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52cccdaffd2f361b4b4eb70b4249bd71d89bb66cb84b7f76483ecd1640c543ce" +checksum = "0b11f32016338b5bdb81179ec286a7d466041c27c5d45810da090c08ae451925" dependencies = [ + "aes", + "aes-gcm", + "aes-kw", "base64", + "cbc", + "des", "digest", "ed25519-dalek", + "hex", + "hmac", + "http", "md-5", "num-bigint-dig", "p256", "p384", + "p521", + "pbkdf2", "picky-asn1", "picky-asn1-der", "picky-asn1-x509", "rand", "rand_core", + "rc2", "rsa", "serde", + "serde_json", "sha1", "sha2", "sha3", @@ -1774,9 +2151,9 @@ dependencies = [ [[package]] name = "picky-asn1" -version = "0.8.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295eea0f33c16be21e2a98b908fdd4d73c04dd48c8480991b76dbcf0cb58b212" +checksum = "2ff038f9360b934342fb3c0a1d6e82c438a2624b51c3c6e3e6d7cf252b6f3ee3" dependencies = [ "oid", "serde", @@ -1787,9 +2164,9 @@ dependencies = [ [[package]] name = "picky-asn1-der" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5df7873a9e36d42dadb393bea5e211fe83d793c172afad5fb4ec846ec582793f" +checksum = "9dccb53c26f70c082e008818f524bd45d057069517b047bd0c0ee062d6d7d7f2" dependencies = [ "picky-asn1", "serde", @@ -1798,9 +2175,9 @@ dependencies = [ [[package]] name = "picky-asn1-x509" -version = "0.12.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c5f20f71a68499ff32310f418a6fad8816eac1a2859ed3f0c5c741389dd6208" +checksum = "511c46b93e7f08571a375882879d3a468dfe8793d73249907b2e3332950cb33e" dependencies = [ "base64", "num-bigint-dig", @@ -1814,9 +2191,9 @@ dependencies = [ [[package]] name = "picky-krb" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71cf61ebe6e657a81bcac31f9d61d52c23a1fd517b0dad77b915a7d3d15d2e8" +checksum = "f5f3c62393fbe5538020af4f8b07d1647f99748becd207476417f8d2aa8900cd" dependencies = [ "aes", "byteorder", @@ -1839,9 +2216,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1872,9 +2249,21 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "polyval" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] [[package]] name = "portpicker" @@ -1893,9 +2282,22 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" +dependencies = [ + "proc-macro2", + "syn 2.0.96", +] [[package]] name = "primeorder" @@ -1908,18 +2310,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -1957,14 +2359,23 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rc2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" +dependencies = [ + "cipher", ] [[package]] name = "rdp-client" version = "0.1.0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "boring", "byteorder", "bytes", @@ -1972,6 +2383,7 @@ dependencies = [ "env_logger", "ironrdp-cliprdr", "ironrdp-connector", + "ironrdp-core", "ironrdp-displaycontrol", "ironrdp-dvc", "ironrdp-pdu", @@ -1985,14 +2397,21 @@ dependencies = [ "iso7816-tlv", "log", "parking_lot 0.12.3", + "picky", + "picky-asn1-der", + "picky-asn1-x509", + "picky-krb", "rand", "rand_chacha", + "reqwest", "rsa", - "sspi 0.10.1", + "rustls", + "sspi", "static_init", "tempfile", "tokio", "tokio-boring", + "url", "utf16string", "uuid", ] @@ -2008,18 +2427,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2029,9 +2448,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2040,26 +2459,27 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", "hyper-rustls", + "hyper-util", "ipnet", "js-sys", "log", @@ -2068,22 +2488,21 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls", - "rustls-native-certs", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", "tokio-rustls", + "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", - "winreg 0.50.0", + "windows-registry", ] [[package]] @@ -2104,7 +2523,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -2113,9 +2532,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -2125,6 +2544,7 @@ dependencies = [ "pkcs1", "pkcs8", "rand_core", + "sha1", "signature", "spki", "subtle", @@ -2145,9 +2565,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -2163,73 +2583,90 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" dependencies = [ + "aws-lc-rs", "log", - "ring", + "once_cell", + "rustls-pki-types", "rustls-webpki", - "sct", + "subtle", + "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" + [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ + "aws-lc-rs", "ring", + "rustls-pki-types", "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2239,20 +2676,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "sct" -version = "0.7.1" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -2264,11 +2691,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation", "core-foundation-sys", "libc", @@ -2277,9 +2704,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -2287,15 +2714,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -2311,22 +2738,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "serde_json" -version = "1.0.118" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2426,9 +2854,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2455,12 +2883,13 @@ dependencies = [ [[package]] name = "sspi" -version = "0.10.1" -source = "git+https://github.com/Devolutions/sspi-rs?rev=d54bdfcafa0e10d9d78224ebacc4f2a0992a6b79#d54bdfcafa0e10d9d78224ebacc4f2a0992a6b79" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94e3c7aa94f5b440eedeab677686629bddcb43edf52ef3703038cce98e2bf70" dependencies = [ "async-dnssd", "async-recursion", - "bitflags 2.6.0", + "bitflags 2.8.0", "byteorder", "cfg-if", "crypto-mac", @@ -2481,6 +2910,9 @@ dependencies = [ "portpicker", "rand", "reqwest", + "rsa", + "rustls", + "rustls-native-certs", "serde", "serde_derive", "sha1", @@ -2490,53 +2922,9 @@ dependencies = [ "tracing", "url", "uuid", - "winapi", - "windows", - "windows-sys 0.48.0", - "winreg 0.51.0", - "zeroize", -] - -[[package]] -name = "sspi" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d31fab47d9290be28a8d027c8428756826f1d4fe1e5ba0f51d24f52c568e21" -dependencies = [ - "async-dnssd", - "async-recursion", - "bitflags 2.6.0", - "byteorder", - "cfg-if", - "crypto-mac", - "futures", - "hmac", - "lazy_static", - "md-5", - "md4", - "num-bigint-dig", - "num-derive", - "num-traits", - "oid", - "picky", - "picky-asn1", - "picky-asn1-der", - "picky-asn1-x509", - "picky-krb", - "rand", - "serde", - "serde_derive", - "sha1", - "sha2", - "time", - "tokio", - "tracing", - "url", - "uuid", - "winapi", "windows", - "windows-sys 0.48.0", - "winreg 0.51.0", + "windows-sys 0.59.0", + "winreg", "zeroize", ] @@ -2563,9 +2951,9 @@ dependencies = [ [[package]] name = "static_init_macro" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" +checksum = "1389c88ddd739ec6d3f8f83343764a0e944cd23cfbf126a9796a714b0b6edd6f" dependencies = [ "cfg_aliases", "memchr", @@ -2582,9 +2970,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2599,9 +2987,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -2610,9 +2998,12 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] [[package]] name = "synstructure" @@ -2622,28 +3013,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", + "syn 2.0.96", ] [[package]] @@ -2654,14 +3024,16 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", + "getrandom 0.3.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2681,22 +3053,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] @@ -2711,9 +3083,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -2733,29 +3105,24 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] [[package]] -name = "tinyvec" -version = "1.6.1" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tls_codec" version = "0.4.1" @@ -2774,32 +3141,31 @@ checksum = "8d9ef545650e79f30233c0003bcc2504d7efac6dad25fca40744de773fe2049c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "tokio" -version = "1.38.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-boring" -version = "4.4.0" -source = "git+https://github.com/gravitational/boring?rev=605253d99d5e363e178bcf97e1d4622e33844cd5#605253d99d5e363e178bcf97e1d4622e33844cd5" +version = "4.7.0" +source = "git+https://github.com/gravitational/boring?rev=99897308abb5976ea05625b8314c24b16eebb01b#99897308abb5976ea05625b8314c24b16eebb01b" dependencies = [ "boring", "boring-sys", @@ -2809,58 +3175,66 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ "rustls", "tokio", ] [[package]] -name = "tokio-util" -version = "0.7.11" +name = "toml" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ - "bytes", "futures-core", - "futures-sink", + "futures-util", "pin-project-lite", + "sync_wrapper", "tokio", + "tower-layer", + "tower-service", ] [[package]] -name = "toml" -version = "0.5.11" +name = "tower-layer" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -2870,20 +3244,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -2902,9 +3276,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "nu-ansi-term", "sharded-slab", @@ -2940,25 +3314,20 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] -name = "unicode-normalization" -version = "0.1.23" +name = "universal-hash" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "tinyvec", + "crypto-common", + "subtle", ] [[package]] @@ -2969,15 +3338,21 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + [[package]] name = "utf16string" version = "0.2.0" @@ -2987,27 +3362,39 @@ dependencies = [ "byteorder", ] +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" -version = "1.9.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -3024,48 +3411,59 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3073,38 +3471,47 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "webpki-roots" -version = "0.25.4" +name = "which" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] [[package]] name = "widestring" @@ -3130,11 +3537,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3145,21 +3552,77 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.51.1" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ "windows-core", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.51.1" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" dependencies = [ - "windows-targets 0.48.5", + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -3177,7 +3640,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3197,18 +3669,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3219,9 +3691,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3231,9 +3703,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3243,15 +3715,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3261,9 +3733,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3273,9 +3745,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3285,9 +3757,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3297,30 +3769,41 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" -version = "0.50.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", "windows-sys 0.48.0", ] [[package]] -name = "winreg" -version = "0.51.0" +name = "wit-bindgen-rt" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "bitflags 2.8.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -3354,6 +3837,72 @@ dependencies = [ "tls_codec", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -3371,5 +3920,27 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.96", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.96", ] diff --git a/Cargo.toml b/Cargo.toml index 0324b56f83d01..bde18b84e4f74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,15 +23,18 @@ codegen-units = 1 [workspace.dependencies] # Note: To use a local IronRDP repository as a crate (for example, ironrdp-cliprdr), define the dependency as follows: # ironrdp-cliprdr = { path = "/path/to/local/IronRDP/crates/ironrdp-cliprdr" } -ironrdp-cliprdr = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-connector = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-displaycontrol = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-dvc = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-graphics = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-pdu = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-rdpdr = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-rdpsnd = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-session = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-svc = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } -ironrdp-tls = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f", features = ["rustls"]} -ironrdp-tokio = { git = "https://github.com/Devolutions/IronRDP", rev = "dfbe947e5b9bd2da06f1e14620ee4d68bca4252f" } +ironrdp-cliprdr = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-connector = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-core = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-displaycontrol = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-dvc = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-graphics = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-pdu = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-rdpdr = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-rdpsnd = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-session = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-svc = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } +ironrdp-tls = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2", features = [ + "rustls", +] } +ironrdp-tokio = { git = "https://github.com/Devolutions/IronRDP", rev = "dd221bf22401c4635798ec012724cba7e6d503b2" } diff --git a/lib/srv/desktop/rdp/rdpclient/Cargo.toml b/lib/srv/desktop/rdp/rdpclient/Cargo.toml index f4a81d1845b7b..cc9fe12c0e00a 100644 --- a/lib/srv/desktop/rdp/rdpclient/Cargo.toml +++ b/lib/srv/desktop/rdp/rdpclient/Cargo.toml @@ -9,13 +9,14 @@ publish.workspace = true crate-type = ["staticlib"] [dependencies] -bitflags = "2.4.2" -boring = { git = "https://github.com/gravitational/boring", rev="605253d99d5e363e178bcf97e1d4622e33844cd5", optional = true } +bitflags = "2.8.0" +boring = { git = "https://github.com/gravitational/boring", rev = "99897308abb5976ea05625b8314c24b16eebb01b", optional = true } byteorder = "1.5.0" -bytes = "1.4.0" -env_logger = "0.10.1" +bytes = "1.10.0" +env_logger = "0.11.6" ironrdp-cliprdr.workspace = true ironrdp-connector.workspace = true +ironrdp-core.workspace = true ironrdp-pdu.workspace = true ironrdp-rdpdr.workspace = true ironrdp-rdpsnd.workspace = true @@ -31,13 +32,20 @@ log = "0.4.20" parking_lot = "0.12.1" rand = { version = "0.8.5", features = ["getrandom"] } rand_chacha = "0.3.1" -rsa = "0.9.6" -sspi = { git = "https://github.com/Devolutions/sspi-rs", rev="d54bdfcafa0e10d9d78224ebacc4f2a0992a6b79", features = ["network_client"] } +rsa = "0.9.7" +sspi = { version = "0.15.0", features = ["network_client"] } static_init = "1.0.3" -tokio = { version = "1.36", features = ["full"] } -tokio-boring = { git = "https://github.com/gravitational/boring", rev="605253d99d5e363e178bcf97e1d4622e33844cd5", optional = true } +tokio = { version = "1.43", features = ["full"] } +tokio-boring = { git = "https://github.com/gravitational/boring", rev = "99897308abb5976ea05625b8314c24b16eebb01b", optional = true } utf16string = "0.2.0" -uuid = { version = "1.8.0", features = ["v4"] } +uuid = { version = "1.12.1", features = ["v4"] } +url = "2.5.4" +picky = { version = "7.0.0-rc.11", default-features = false } +picky-asn1-der = "0.5.2" +picky-asn1-x509 = "0.14.3" +picky-krb = "0.9.2" +reqwest = { version = "0.12", default-features = false } +rustls = { version = "0.23.22", default-features = false, features = ["aws-lc-rs"] } [build-dependencies] cbindgen = "0.26.0" diff --git a/lib/srv/desktop/rdp/rdpclient/src/client.rs b/lib/srv/desktop/rdp/rdpclient/src/client.rs index 116813e9ebdf9..f5a0c482f7fc0 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/client.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/client.rs @@ -39,22 +39,21 @@ use ironrdp_pdu::input::fast_path::{ }; use ironrdp_pdu::input::mouse::PointerFlags; use ironrdp_pdu::input::{InputEventError, MousePdu}; -use ironrdp_pdu::mcs::DisconnectReason; use ironrdp_pdu::rdp::capability_sets::MajorPlatformType; use ironrdp_pdu::rdp::client_info::PerformanceFlags; use ironrdp_pdu::rdp::RdpError; use ironrdp_pdu::write_buf::WriteBuf; -use ironrdp_pdu::PduResult; -use ironrdp_pdu::{custom_err, function, PduError}; +use ironrdp_pdu::{encode_err, encode_vec, EncodeError, PduResult}; +use ironrdp_pdu::{function, pdu_other_err, PduError}; use ironrdp_rdpdr::pdu::efs::ClientDeviceListAnnounce; use ironrdp_rdpdr::pdu::RdpdrPdu; use ironrdp_rdpdr::Rdpdr; -use ironrdp_rdpsnd::Rdpsnd; -use ironrdp_session::x224::{self, ProcessorOutput}; +use ironrdp_rdpsnd::client::{NoopRdpsndBackend, Rdpsnd}; +use ironrdp_session::x224::{self, DisconnectDescription, ProcessorOutput}; use ironrdp_session::SessionErrorKind::Reason; use ironrdp_session::{reason_err, SessionError, SessionResult}; use ironrdp_svc::{SvcMessage, SvcProcessor, SvcProcessorMessages}; -use ironrdp_tokio::{single_sequence_step_read, Framed, TokioStream}; +use ironrdp_tokio::{single_sequence_step_read, Framed, FramedWrite, TokioStream}; use log::debug; use rand::{Rng, SeedableRng}; use std::fmt::{Debug, Display, Formatter}; @@ -108,7 +107,7 @@ impl Client { pub fn run( cgo_handle: CgoHandle, params: ConnectParams, - ) -> ClientResult> { + ) -> ClientResult> { global::TOKIO_RT.block_on(async { Self::connect(cgo_handle, params) .await? @@ -182,7 +181,7 @@ impl Client { let mut connector = ironrdp_connector::ClientConnector::new(connector_config.clone()) .with_server_addr(server_socket_addr) .with_static_channel(drdynvc_client) // require for resizing - .with_static_channel(Rdpsnd::new()) // required for rdpdr to work + .with_static_channel(Rdpsnd::new(Box::new(NoopRdpsndBackend {}))) // required for rdpdr to work .with_static_channel(rdpdr); // required for smart card + directory sharing if params.allow_clipboard { @@ -267,7 +266,7 @@ impl Client { /// which it then executes. /// /// When either loop returns, the other is aborted and the result is returned. - async fn run_loops(mut self) -> ClientResult> { + async fn run_loops(mut self) -> ClientResult> { let read_stream = self .read_stream .take() @@ -322,7 +321,7 @@ impl Client { mut read_stream: RdpReadStream, x224_processor: Arc>, write_requester: ClientHandle, - ) -> tokio::task::JoinHandle>> { + ) -> tokio::task::JoinHandle>> { global::TOKIO_RT.spawn(async move { loop { let (action, mut frame) = read_stream.read_pdu().await?; @@ -362,8 +361,9 @@ impl Client { &mut read_stream, sequence.as_mut(), &mut buf, + None, ) - .await?; + .await?; if written.size().is_some() { write_requester @@ -505,7 +505,7 @@ impl Client { debug!("DisplayControlClient channel opened"); // We've been notified that the DisplayControl dvc channel has been opened: let mut pending_resize = - Self::resize_manager_lock(pending_resize).map_err(|err| custom_err!(err))?; + Self::resize_manager_lock(pending_resize).map_err(ClientError::from)?; let pending_resize = pending_resize.pending_resize.take(); if let Some((width, height)) = pending_resize { // If there was a resize pending, perform it now. @@ -518,7 +518,8 @@ impl Client { height, None, Some((width, height)), - )? + ) + .map_err(|e| encode_err!(e))? .into(); return Ok(vec![Box::new(pdu)]); } @@ -670,7 +671,7 @@ impl Client { event: FastPathInputEvent, ) -> ClientResult<()> { write_stream - .write_all(&ironrdp_pdu::encode_vec(&FastPathInput(vec![event]))?) + .write_all(&encode_vec(&FastPathInput(vec![event]))?) .await?; Ok(()) } @@ -1392,7 +1393,7 @@ fn create_config(params: &ConnectParams, pin: String) -> Config { }, enable_tls: true, enable_credssp: false, - credentials: Credentials::SmartCard { pin }, + credentials: Credentials::SmartCard { pin, config: None }, domain: None, // Windows 10, Version 1909, same as FreeRDP as of October 5th, 2021. // This determines which Smart Card Redirection dialect we use per @@ -1416,6 +1417,7 @@ fn create_config(params: &ConnectParams, pin: String) -> Config { no_server_pointer: false, autologon: true, pointer_software_rendering: false, + request_data: None, performance_flags: PerformanceFlags::default() | PerformanceFlags::DISABLE_CURSOR_SHADOW // this is required for pointer to work correctly in Windows 2019 | if !params.show_desktop_wallpaper { @@ -1424,6 +1426,8 @@ fn create_config(params: &ConnectParams, pin: String) -> Config { PerformanceFlags::empty() }, desktop_scale_factor: 0, + license_cache: None, + hardware_id: None, } } @@ -1443,6 +1447,7 @@ pub struct ConnectParams { pub enum ClientError { Tcp(IoError), Rdp(RdpError), + EncodeError(EncodeError), PduError(PduError), SessionError(SessionError), ConnectorError(ConnectorError), @@ -1476,6 +1481,7 @@ impl Display for ClientError { ClientError::SendError(msg) => Display::fmt(&msg.to_string(), f), ClientError::InternalError(msg) => Display::fmt(&msg.to_string(), f), ClientError::UnknownAddress => Display::fmt("Unknown address", f), + ClientError::EncodeError(e) => Display::fmt(e, f), ClientError::PduError(e) => Display::fmt(e, f), #[cfg(feature = "fips")] ClientError::ErrorStack(e) => Display::fmt(e, f), @@ -1527,6 +1533,12 @@ impl From for ClientError { } } +impl From for ClientError { + fn from(e: EncodeError) -> Self { + ClientError::EncodeError(e) + } +} + impl From for ClientError { fn from(e: PduError) -> Self { ClientError::PduError(e) @@ -1535,7 +1547,7 @@ impl From for ClientError { impl From for PduError { fn from(e: ClientError) -> Self { - custom_err!(e) + pdu_other_err!("", source:e) } } diff --git a/lib/srv/desktop/rdp/rdpclient/src/lib.rs b/lib/srv/desktop/rdp/rdpclient/src/lib.rs index 217e11181d7c6..c90e9daecfe42 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/lib.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/lib.rs @@ -28,6 +28,7 @@ use crate::client::global::get_client_handle; use crate::client::Client; use crate::rdpdr::tdp::SharedDirectoryAnnounce; use client::{ClientHandle, ClientResult, ConnectParams}; +use ironrdp_session::x224::DisconnectDescription; use log::{error, trace, warn}; use rdpdr::path::UnixPath; use rdpdr::tdp::{ @@ -107,9 +108,16 @@ pub unsafe extern "C" fn client_run(cgo_handle: CgoHandle, params: CGOConnectPar Ok(res) => CGOResult { err_code: CGOErrCode::ErrCodeSuccess, message: match res { - Some(reason) => CString::new(reason.description().to_string()) - .map(|c| c.into_raw()) - .unwrap_or(ptr::null_mut()), + Some(DisconnectDescription::McsDisconnect(reason)) => { + CString::new(reason.description().to_string()) + .map(|c| c.into_raw()) + .unwrap_or(ptr::null_mut()) + } + Some(DisconnectDescription::ErrorInfo(info)) => { + CString::new(info.description().to_string()) + .map(|c| c.into_raw()) + .unwrap_or(ptr::null_mut()) + } None => ptr::null_mut(), }, }, diff --git a/lib/srv/desktop/rdp/rdpclient/src/piv.rs b/lib/srv/desktop/rdp/rdpclient/src/piv.rs index 8c7b2e4a10ac5..29a2c02a5daab 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/piv.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/piv.rs @@ -15,7 +15,7 @@ // along with this program. If not, see . use crate::rdpdr::TeleportRdpdrBackendError; -use ironrdp_pdu::{custom_err, other_err, PduResult}; +use ironrdp_pdu::{pdu_other_err, PduResult}; use iso7816::aid::Aid; use iso7816::command::instruction::Instruction; use iso7816::command::Command; @@ -58,7 +58,7 @@ pub struct Card { impl Card { pub fn new(uuid: Uuid, cert_der: &[u8], key_der: &[u8], pin: String) -> PduResult { let piv_auth_key = RsaPrivateKey::from_pkcs1_der(key_der) - .map_err(|_e| other_err!("failed to parse private key from DER"))?; + .map_err(|_e| pdu_other_err!("failed to parse private key from DER"))?; Ok(Self { chuid: Self::build_chuid(uuid), @@ -79,7 +79,7 @@ impl Card { None => cmd, Some(pending) => { pending.extend_from_command(&cmd).map_err(|e| { - custom_err!(TeleportRdpdrBackendError(format!( + pdu_other_err!("", source: TeleportRdpdrBackendError(format!( "could not build chained command: {e:?}" ))) })?; @@ -158,8 +158,9 @@ impl Card { if cmd.p1 != 0x3F && cmd.p2 != 0xFF { return Ok(Response::new(Status::NotFound)); } - let request_tlv = Tlv::from_bytes(cmd.data()) - .map_err(|e| custom_err!(TeleportRdpdrBackendError(format!("TLV invalid: {e:?}"))))?; + let request_tlv = Tlv::from_bytes(cmd.data()).map_err( + |e| pdu_other_err!("", source:TeleportRdpdrBackendError(format!("TLV invalid: {e:?}"))), + )?; if *request_tlv.tag() != tlv_tag(0x5C)? { return Ok(Response::new(Status::NotFound)); } @@ -189,7 +190,9 @@ impl Card { None => Ok(Response::new(Status::NotFound)), Some(cursor) => { let mut chunk = [0; CHUNK_SIZE]; - let n = cursor.read(&mut chunk).map_err(|e| custom_err!(e))?; + let n = cursor + .read(&mut chunk) + .map_err(|e| pdu_other_err!("", source:e))?; let mut chunk = chunk.to_vec(); chunk.truncate(n); let remaining = cursor.get_ref().len() as u64 - cursor.position(); @@ -237,23 +240,24 @@ impl Card { // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-78-4.pdf // TODO(zmb3): support non-RSA keys, if needed. if cmd.p1 != 0x07 { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "unsupported algorithm identifier P1:{:#X} in general authenticate command", cmd.p1 )))); } // P2='9A' means PIV Authentication Key (matches our cert '5FC105' in handle_get_data). if cmd.p2 != 0x9A { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "unsupported key reference P2:{:#X} in general authenticate command", cmd.p2 )))); } - let request_tlv = Tlv::from_bytes(cmd.data()) - .map_err(|e| custom_err!(TeleportRdpdrBackendError(format!("TLV invalid: {e:?}"))))?; + let request_tlv = Tlv::from_bytes(cmd.data()).map_err( + |e| pdu_other_err!("", source:TeleportRdpdrBackendError(format!("TLV invalid: {e:?}"))), + )?; if *request_tlv.tag() != tlv_tag(TLV_TAG_DYNAMIC_AUTHENTICATION_TEMPLATE)? { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "general authenticate command TLV invalid: {request_tlv:?}" )))); } @@ -261,7 +265,7 @@ impl Card { // Extract the challenge field. let request_tlvs = match request_tlv.value() { Value::Primitive(_) => { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "general authenticate command TLV invalid: {request_tlv:?}" )))); } @@ -275,14 +279,14 @@ impl Card { challenge = match data.value() { Value::Primitive(chal) => Some(chal), Value::Constructed(_) => { - return Err(custom_err!(TeleportRdpdrBackendError(format!( + return Err(pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "general authenticate command TLV invalid: {request_tlv:?}" )))); } }; } let challenge = challenge.ok_or_else(|| { - custom_err!(TeleportRdpdrBackendError(format!( + pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "general authenticate command TLV invalid: {request_tlv:?}, missing challenge data" ))) })?; @@ -407,7 +411,7 @@ const TLV_TAG_RESPONSE: u8 = 0x82; fn tlv(tag: u8, value: Value) -> PduResult { Tlv::new(tlv_tag(tag)?, value).map_err(|e| { - custom_err!(TeleportRdpdrBackendError(format!( + pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "TLV with tag {tag:#X} invalid: {e:?}" ))) }) @@ -415,7 +419,7 @@ fn tlv(tag: u8, value: Value) -> PduResult { fn tlv_tag(val: u8) -> PduResult { Tag::try_from(val).map_err(|e| { - custom_err!(TeleportRdpdrBackendError(format!( + pdu_other_err!("", source:TeleportRdpdrBackendError(format!( "TLV tag {val:#X} invalid: {e:?}" ))) }) diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs index d9784b2b6399b..bf6c2e7ff6d51 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr.rs @@ -28,13 +28,14 @@ use self::tdp::{ }; use crate::client::ClientHandle; use crate::CgoHandle; -use ironrdp_pdu::{custom_err, PduResult}; +use ironrdp_core::impl_as_any; +use ironrdp_pdu::{pdu_other_err, PduResult}; use ironrdp_rdpdr::pdu::efs::{ DeviceControlRequest, NtStatus, ServerDeviceAnnounceResponse, ServerDriveIoRequest, }; use ironrdp_rdpdr::pdu::esc::{ScardCall, ScardIoCtlCode}; use ironrdp_rdpdr::RdpdrBackend; -use ironrdp_svc::impl_as_any; +use ironrdp_svc::SvcMessage; #[derive(Debug)] pub struct TeleportRdpdrBackend { @@ -56,10 +57,13 @@ impl RdpdrBackend for TeleportRdpdrBackend { // If the device announce for the smart card failed, return an error that will end the session. // Authentication is impossible without a smart card. if pdu.device_id == SCARD_DEVICE_ID && pdu.result_code != NtStatus::SUCCESS { - return Err(custom_err!(TeleportRdpdrBackendError(format!( - "ServerDeviceAnnounceResponse for smartcard failed with NtStatus: {:?}", - pdu.result_code - )))); + return Err(pdu_other_err!( + "", + source:TeleportRdpdrBackendError(format!( + "ServerDeviceAnnounceResponse for smartcard failed with NtStatus: {:?}", + pdu.result_code + )) + )); } // If the device announce is not for a smart card, assume it's for a directory @@ -79,16 +83,21 @@ impl RdpdrBackend for TeleportRdpdrBackend { self.scard.handle(req, call) } - fn handle_drive_io_request(&mut self, req: ServerDriveIoRequest) -> PduResult<()> { + fn handle_drive_io_request(&mut self, req: ServerDriveIoRequest) -> PduResult> { // If directory sharing isn't enabled, we don't advertise drive redirection as a supported - // feature, so we should never receive a drive IO request. However this check acts as a + // feature, so we should never receive a drive IO request. However, this check acts as a // safeguard in case of a server bug or some other anomalous behavior. if self.allow_directory_sharing { - self.fs.handle_rdp_drive_io_request(req) + self.fs.handle_rdp_drive_io_request(req)?; + Ok(vec![]) } else { - Err(custom_err!(TeleportRdpdrBackendError( - "Received a directory sharing PDU but directory sharing is not enabled".to_string() - ))) + Err(pdu_other_err!( + "", + source:TeleportRdpdrBackendError( + "Received a directory sharing PDU but directory sharing is not enabled" + .to_string() + ) + )) } } } diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs index a954af5d0571e..322e049a66fb1 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/filesystem.rs @@ -18,13 +18,16 @@ use super::{ path::UnixPath, tdp::{self, TdpErrCode}, }; +use crate::client::{ClientError, ClientResult}; use crate::{ cgo_tdp_sd_acknowledge, cgo_tdp_sd_create_request, cgo_tdp_sd_delete_request, cgo_tdp_sd_info_request, cgo_tdp_sd_list_request, cgo_tdp_sd_move_request, cgo_tdp_sd_read_request, cgo_tdp_sd_truncate_request, cgo_tdp_sd_write_request, client::ClientHandle, CGOErrCode, CgoHandle, }; -use ironrdp_pdu::{cast_length, custom_err, other_err, PduResult}; +use ironrdp_core::{cast_length, EncodeError}; +use ironrdp_pdu::PduResult; +use ironrdp_pdu::{pdu_other_err, PduError, PduErrorExt}; use ironrdp_rdpdr::pdu::{ self, efs::{self, NtStatus}, @@ -33,6 +36,17 @@ use ironrdp_rdpdr::pdu::{ use log::{debug, warn}; use std::collections::HashMap; use std::convert::TryInto; +use std::fmt::Debug; + +pub(crate) fn cast_length>( + ctx: &str, + field: &str, + s: S, +) -> ClientResult { + s.try_into().map_err(|e| { + ClientError::InternalError(format!("{}: can't convert {}: {:?}", ctx, field, e)) + }) +} /// `FilesystemBackend` implements the filesystem redirection backend as described in [\[MS-RDPEFS\]: Remote Desktop Protocol: File System Virtual Channel Extension]. /// It does so in concert with the TDP directory sharing extension described in [RFD 0067]. @@ -164,10 +178,13 @@ impl FilesystemBackend { ) -> PduResult<()> { match res.err_code { TdpErrCode::Failed | TdpErrCode::AlreadyExists => { - return Err(custom_err!(FilesystemBackendError(format!( - "received unexpected TDP error code in SharedDirectoryInfoResponse: {:?}", - res.err_code, - )))); + return Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unexpected TDP error code in SharedDirectoryInfoResponse: {:?}", + res.err_code, + )) + )); } TdpErrCode::Nil => { // The file exists @@ -314,14 +331,17 @@ impl FilesystemBackend { } } _ => { - return Err(custom_err!(FilesystemBackendError(format!( - "received unknown CreateDisposition value for RDP {req:?}", - req = req - )))); + return Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unknown CreateDisposition value for RDP {req:?}", + req = req + )) + )); } } - Err(other_err!( + Err(pdu_other_err!( "Programmer error, this line should never be reached" )) } @@ -364,9 +384,7 @@ impl FilesystemBackend { ), Some(dir) => { if dir.fso.file_type != tdp::FileType::Directory { - return Err(other_err!( - "received ServerDriveQueryDirectoryRequest request for a file rather than a directory", - )); + return Err(pdu_other_err!("received ServerDriveQueryDirectoryRequest request for a file rather than a directory")); } if rdp_req.initial_query == 0 { @@ -417,10 +435,13 @@ impl FilesystemBackend { // For now any error will kill the session. // In the future, we might want to make this send back // an NTSTATUS::STATUS_UNSUCCESSFUL instead. - return Err(custom_err!(FilesystemBackendError(format!( - "SharedDirectoryListRequest failed with err_code = {:?}", - tdp_resp.err_code - )))); + return Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "SharedDirectoryListRequest failed with err_code = {:?}", + tdp_resp.err_code + )) + )); } // If SharedDirectoryListRequest succeeded, move the @@ -455,10 +476,13 @@ impl FilesystemBackend { ) -> PduResult<()> { match self.file_cache.get(rdp_req.device_io_request.file_id) { // File not found in cache - None => Err(custom_err!(FilesystemBackendError(format!( - "failed to retrieve an item from the file cache with FileId = {}", - rdp_req.device_io_request.file_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "failed to retrieve an item from the file cache with FileId = {}", + rdp_req.device_io_request.file_id + )) + )), Some(dir) => { let buffer: Option = match rdp_req .fs_info_class_lvl @@ -470,7 +494,8 @@ impl FilesystemBackend { "FilesystemBackend::handle_query_volume_req", "dir.fso.last_modified", dir.fso.last_modified - )?, + ) + .map_err(|e: EncodeError| ClientError::from(e))?, // Equivalent to `u32::MAX & 0xffff` which is what FreeRDP does between // https://github.com/FreeRDP/FreeRDP/blob/511444a65e7aa2f537c5e531fa68157a50c1bd4d/winpr/libwinpr/file/file.c#L1018-L1021 // https://github.com/FreeRDP/FreeRDP/blob/511444a65e7aa2f537c5e531fa68157a50c1bd4d/channels/drive/client/drive_main.c#L492 @@ -618,10 +643,13 @@ impl FilesystemBackend { // https://github.com/FreeRDP/FreeRDP/blob/dfa231c0a55b005af775b833f92f6bcd30363d77/channels/drive/client/drive_file.c#L579 self.send_rdp_set_info_response(&rdp_req, io_status) } - _ => Err(custom_err!(FilesystemBackendError(format!( - "received unsupported FileInformationClass value for RDP {:?}", - rdp_req - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unsupported FileInformationClass value for RDP {:?}", + rdp_req + )) + )), } } @@ -873,7 +901,7 @@ impl FilesystemBackend { completion_id: rdp_req.device_io_request.completion_id, directory_id: rdp_req.device_io_request.device_id, path: file.path.clone(), - end_of_file: cast_length!("end_of_file", end_of_file)?, + end_of_file: cast_length("tdp_sd_truncate", "end_of_file", end_of_file)?, })?; self.pending_sd_truncate_resp_handlers.insert( @@ -891,7 +919,8 @@ impl FilesystemBackend { this.file_cache.get_mut(rdp_req.device_io_request.file_id) { // Truncate succeeded, update our internal books to reflect the new size. - file.fso.size = cast_length!("end_of_file", end_of_file)?; + file.fso.size = + cast_length("tdp_sd_truncate", "end_of_file", end_of_file)?; io_status } else { // This shouldn't happen. @@ -960,10 +989,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_acknowledge(self.cgo_handle, &mut tdp_req) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_acknowledge failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_acknowledge failed: {:?}", + err + )) + )), } } @@ -974,10 +1006,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_info_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_info_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_info_request failed: {:?}", + err + )) + )), } } @@ -991,10 +1026,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_truncate_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_truncate_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_truncate_request failed: {:?}", + err + )) + )), } } @@ -1008,10 +1046,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_create_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_create_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_create_request failed: {:?}", + err + )) + )), } } @@ -1025,10 +1066,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_delete_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_delete_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_delete_request failed: {:?}", + err + )) + )), } } @@ -1039,10 +1083,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_list_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_list_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_list_request failed: {:?}", + err + )) + )), } } @@ -1053,10 +1100,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_read_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_read_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_read_request failed: {:?}", + err + )) + )), } } @@ -1070,10 +1120,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_write_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_write_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_write_request failed: {:?}", + err + )) + )), } } @@ -1084,10 +1137,13 @@ impl FilesystemBackend { let err = unsafe { cgo_tdp_sd_move_request(self.cgo_handle, req.cgo()) }; match err { CGOErrCode::ErrCodeSuccess => Ok(()), - _ => Err(custom_err!(FilesystemBackendError(format!( - "call to tdp_sd_move_request failed: {:?}", - err - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "call to tdp_sd_move_request failed: {:?}", + err + )) + )), } } @@ -1104,10 +1160,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1124,10 +1183,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1144,10 +1206,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1164,10 +1229,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1184,10 +1252,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1204,10 +1275,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1220,10 +1294,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1236,10 +1313,13 @@ impl FilesystemBackend { .remove(&tdp_resp.completion_id) { Some(handler) => handler.call(self, tdp_resp), - None => Err(custom_err!(FilesystemBackendError(format!( - "received invalid completion id: {}", - tdp_resp.completion_id - )))), + None => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received invalid completion id: {}", + tdp_resp.completion_id + )) + )), } } @@ -1266,7 +1346,7 @@ impl FilesystemBackend { { Ok(efs::Information::FILE_OVERWRITTEN) } else { - Err(other_err!( + Err(pdu_other_err!( "program error, CreateDispositionFlags check should be exhaustive" )) }?; @@ -1325,10 +1405,13 @@ impl FilesystemBackend { efs::FileInformationClassLevel::FILE_ATTRIBUTE_TAG_INFORMATION => { self.send_rdp_file_attr_tag_info(device_io_response, file) } - _ => Err(custom_err!(FilesystemBackendError(format!( - "received unsupported FileInformationClass: {:?}", - rdp_req.file_info_class_lvl - )))), + _ => Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unsupported FileInformationClass: {:?}", + rdp_req.file_info_class_lvl + )) + )), } } @@ -1364,10 +1447,10 @@ impl FilesystemBackend { device_io_response: efs::DeviceIoResponse, file: &FileCacheObject, ) -> PduResult<()> { - let file_fso_size: i64 = cast_length!( + let file_fso_size: i64 = cast_length( "FilesystemBackend::send_file_standard_info", "file.fso.size", - file.fso.size + file.fso.size, )?; self.client_handle.write_rdpdr( @@ -1465,10 +1548,13 @@ impl FilesystemBackend { Some(efs::FileInformationClass::Directory(fso.into_directory()?)) } _ => { - return Err(custom_err!(FilesystemBackendError(format!( - "received unsupported file information class level: {:?}", - req.file_info_class_lvl, - )))); + return Err(pdu_other_err!( + "", + source:FilesystemBackendError(format!( + "received unsupported file information class level: {:?}", + req.file_info_class_lvl, + )) + )); } }; @@ -1586,8 +1672,11 @@ impl FilesystemBackend { req: &efs::ServerDriveSetInformationRequest, io_status: NtStatus, ) -> PduResult<()> { - self.client_handle - .write_rdpdr(efs::ClientDriveSetInformationResponse::new(req, io_status)?.into())?; + self.client_handle.write_rdpdr( + efs::ClientDriveSetInformationResponse::new(req, io_status) + .map_err(|e| PduError::encode("send_rdp_set_info_response", e))? + .into(), + )?; Ok(()) } } @@ -1615,9 +1704,7 @@ impl FileCache { if self.cache.insert(self.next_file_id, file).is_none() { Ok(self.next_file_id) } else { - Err(other_err!( - "attempted to insert a FileCacheObject into the file cache with a file_id that already exists in the cache" - )) + Err(pdu_other_err!("attempted to insert a FileCacheObject into the file cache with a file_id that already exists in the cache")) } } @@ -1695,7 +1782,7 @@ impl FileCacheObject { /// FileCacheObject is used as an iterator for the implementation of /// IRP_MJ_DIRECTORY_CONTROL, which requires that we iterate through /// all the files of a directory one by one. In this case, the directory -/// is the FileCacheObject itself, with it's own fso field representing +/// is the FileCacheObject itself, with its own fso field representing /// the directory, and its contents being represented by tdp::FileSystemObject's /// in its contents field. /// diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/path.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/path.rs index b5d3d7db97b80..fdff99feb1ebd 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/path.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/path.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -use ironrdp_pdu::{custom_err, PduResult}; +use ironrdp_pdu::{pdu_other_err, PduResult}; use std::ffi::CString; /// WindowsPath is a String that we assume to be in the form @@ -63,10 +63,10 @@ impl UnixPath { /// any characters that can't be handled by CString::new(). pub fn to_cstring(&self) -> PduResult { CString::new(self.path.clone()).map_err(|e| { - custom_err!(PathError(format!( - "Error converting UnixPath to CString: {}", - e - ))) + pdu_other_err!( + "", + source:PathError(format!("Error converting UnixPath to CString: {}", e)) + ) }) } diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/scard.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/scard.rs index cb54d492d8fa4..f5e4acd4962fa 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/scard.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/scard.rs @@ -16,8 +16,9 @@ use crate::client::ClientHandle; use crate::{piv, util}; +use ironrdp_pdu::pdu_other_err; use ironrdp_pdu::utils::CharacterSet; -use ironrdp_pdu::{custom_err, other_err, PduResult}; +use ironrdp_pdu::PduResult; use ironrdp_rdpdr::pdu::efs::{DeviceControlRequest, DeviceControlResponse, NtStatus}; use ironrdp_rdpdr::pdu::esc::{ rpce, CardProtocol, CardState, CardStateFlags, ConnectCall, ConnectReturn, ContextCall, @@ -154,10 +155,13 @@ impl ScardBackend { ScardCall::GetReaderIconCall(_) => self.handle_get_reader_icon(req), _ => Self::unsupported_combo_error(req.io_control_code, call), }, - _ => Err(custom_err!(SmartcardBackendError(format!( - "received unhandled ScardIoCtlCode: {:?}", - req.io_control_code - )))), + _ => Err(pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "received unhandled ScardIoCtlCode: {:?}", + req.io_control_code + )) + )), }?; Ok(()) @@ -336,10 +340,13 @@ impl ScardBackend { ) -> PduResult<()> { let cmd = CardCommand::::try_from(&call.send_buffer).map_err(|err| { - custom_err!(SmartcardBackendError(format!( - "failed to parse smartcard command {:?}: {:?}", - &call.send_buffer, err - ))) + pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "failed to parse smartcard command {:?}: {:?}", + &call.send_buffer, err + )) + ) })?; let card = self.contexts.get_card(&call.handle)?; @@ -356,10 +363,13 @@ impl ScardBackend { ScardIoCtlCode::StatusW => CharacterSet::Unicode, ScardIoCtlCode::StatusA => CharacterSet::Ansi, _ => { - return Err(custom_err!(SmartcardBackendError(format!( - "got unexpected ScardIoCtlCode with a StatusCall: {:?}", - req.io_control_code - )))); + return Err(pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "got unexpected ScardIoCtlCode with a StatusCall: {:?}", + req.io_control_code + )) + )); } }; @@ -457,10 +467,13 @@ impl ScardBackend { GetDeviceTypeIdReturn::new(ReturnCode::Success, SCARD_READER_TYPE_VENDOR), ) } else { - Err(custom_err!(SmartcardBackendError(format!( - "got GetDeviceTypeIdCall for unknown context [{}]", - call.context.value - )))) + Err(pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "got GetDeviceTypeIdCall for unknown context [{}]", + call.context.value + )) + )) } } @@ -497,10 +510,13 @@ impl ScardBackend { /// This function returns the error for unsupported combinations of [`ScardIoCtlCode`] and [`ScardCall`]. fn unsupported_combo_error(ioctl: ScardIoCtlCode, call: ScardCall) -> PduResult<()> { - Err(custom_err!(SmartcardBackendError(format!( - "received unsupported combination of ScardIoCtlCode [{:?}] with ScardCall [{:?}]", - ioctl, call - )))) + Err(pdu_other_err!( + "", + source:SmartcardBackendError(format!( + "received unsupported combination of ScardIoCtlCode [{:?}] with ScardCall [{:?}]", + ioctl, call + )) + )) } fn send_device_control_response( @@ -570,7 +586,7 @@ impl Contexts { fn get_card(&mut self, handle: &ScardHandle) -> PduResult<&mut piv::Card> { self.get_internal_mut(handle.context.value)? .get(handle.value) - .ok_or_else(|| other_err!("unknown ScardHandle")) + .ok_or_else(|| pdu_other_err!("unknown ScardHandle")) } fn exists(&self, id: u32) -> bool { @@ -592,7 +608,7 @@ impl Contexts { fn get_internal_mut(&mut self, id: u32) -> PduResult<&mut ContextInternal> { self.contexts .get_mut(&id) - .ok_or_else(|| other_err!("unknown context id")) + .ok_or_else(|| pdu_other_err!("unknown context id")) } fn release(&mut self, id: u32) { @@ -627,7 +643,7 @@ impl ContextInternal { fn set_scard_cancel_response(&mut self, resp: DeviceControlResponse) -> PduResult<()> { if self.scard_cancel_response.is_some() { - return Err(other_err!("SCARD_IOCTL_CANCEL already received",)); + return Err(pdu_other_err!("SCARD_IOCTL_CANCEL already received",)); } self.scard_cancel_response = Some(resp); Ok(()) diff --git a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs index 0c87aaca06162..34cbccfd5aed8 100644 --- a/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs +++ b/lib/srv/desktop/rdp/rdpclient/src/rdpdr/tdp.rs @@ -15,6 +15,7 @@ // along with this program. If not, see . use super::{filesystem::FileCacheObject, path::UnixPath}; +use crate::rdpdr::filesystem::cast_length; use crate::{ util::{self, from_c_string, from_go_array}, CGOSharedDirectoryAnnounce, CGOSharedDirectoryCreateRequest, CGOSharedDirectoryCreateResponse, @@ -23,11 +24,13 @@ use crate::{ CGOSharedDirectoryReadRequest, CGOSharedDirectoryReadResponse, CGOSharedDirectoryTruncateRequest, CGOSharedDirectoryWriteRequest, }; -use ironrdp_pdu::{cast_length, custom_err, PduResult}; + +use ironrdp_pdu::pdu_other_err; +use ironrdp_pdu::PduResult; use ironrdp_rdpdr::pdu::efs::{ self, DeviceCloseRequest, DeviceCreateRequest, DeviceReadRequest, DeviceWriteRequest, }; -use std::convert::TryInto; + use std::ffi::CString; /// SharedDirectoryAnnounce is sent by the TDP client to the server @@ -137,10 +140,13 @@ impl FileSystemObject { if let Some(name) = self.path.last() { Ok(name.to_string()) } else { - Err(custom_err!(TdpHandlingError(format!( - "failed to extract name from path: {:?}", - self.path - )))) + Err(pdu_other_err!( + "", + source:TdpHandlingError(format!( + "failed to extract name from path: {:?}", + self.path + )) + )) } } @@ -158,10 +164,10 @@ impl FileSystemObject { last_modified, last_modified, last_modified, - cast_length!( + cast_length( "FileSystemObject::into_both_directory", "self.size", - self.size + self.size, )?, file_attributes, self.name()?, @@ -182,10 +188,10 @@ impl FileSystemObject { last_modified, last_modified, last_modified, - cast_length!( + cast_length( "FileSystemObject::into_both_directory", "self.size", - self.size + self.size, )?, file_attributes, self.name()?, @@ -210,7 +216,7 @@ impl FileSystemObject { last_modified, last_modified, last_modified, - cast_length!("FileSystemObject::into_directory", "self.size", self.size)?, + cast_length("FileSystemObject::into_directory", "self.size", self.size)?, file_attributes, self.name()?, ))