fix(rdpeudp): harden TLS sideband setup - #1811
Open
Marc-André Moreau (mamoreau-devolutions) wants to merge 2 commits into
Open
fix(rdpeudp): harden TLS sideband setup#1811Marc-André Moreau (mamoreau-devolutions) wants to merge 2 commits into
Marc-André Moreau (mamoreau-devolutions) wants to merge 2 commits into
Conversation
Extract the reusable rustls verifier/client-config builder out of ironrdp-tls into a new rustls_verifier module (gated behind a rustls-verifier feature) so the RDPEUDP2 reliable-UDP TLS sideband can share the same certificate validation policy and callback semantics as the primary TCP transport, without pulling in a specific TLS stream backend. ironrdp-rdpeudp-tokio now depends on ironrdp-tls (rustls-verifier only) and gains a UdpTlsConfig type covering certificate validation mode, callback, and endpoint. The synchronous validation callback runs on a blocking-pool thread with a nested current-thread runtime so it cannot starve the current-thread RDPEUDP driver. TLS handshake and RDPEMT tunnel establishment are now wrapped in bounded timeouts (tls_timeout, tunnel_timeout) with dedicated error kinds. The Driver gains a Drop impl that closes SharedIo and wakes parked readers when the stream was not already released, so aborting or dropping a connection attempt cannot strand a blocking-pool thread or leave detached TLS work parked forever. MultitransportBootstrap::connect now takes the TLS config directly instead of an optional raw verifier, and its docs clarify that S_OK is only sent once Soft-Sync has been negotiated.
Marc-André Moreau (mamoreau-devolutions)
deployed
to
llm-providers
August 27, 2026 15:45 — with
GitHub Actions
Active
Copilot started reviewing on behalf of
Marc-André Moreau (mamoreau-devolutions)
August 27, 2026 15:45
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens RDPEUDP2 TLS sideband setup by sharing certificate validation with the primary transport, bounding connection phases, and improving cancellation cleanup.
Changes:
- Extracts a reusable rustls verifier/configuration feature.
- Adds UDP TLS configuration, callback isolation, and handshake timeouts.
- Ensures dropped drivers wake blocked I/O and expands integration coverage.
Dedicated prose reviewers were skipped due to the five-skill limit; documentation was reviewed directly.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.lock |
Records the new TLS dependency edge. |
crates/ironrdp-tls/Cargo.toml |
Adds the verifier-only feature. |
crates/ironrdp-tls/src/lib.rs |
Exports the shared rustls builder. |
crates/ironrdp-tls/src/rustls.rs |
Reuses shared TLS configuration. |
crates/ironrdp-tls/src/rustls_verifier.rs |
Implements certificate verifier construction. |
crates/ironrdp-rdpeudp-tokio/Cargo.toml |
Adds verifier-only TLS dependency. |
crates/ironrdp-rdpeudp-tokio/README.md |
Documents supported transport and strict validation. |
crates/ironrdp-rdpeudp-tokio/src/driver.rs |
Closes shared I/O when dropped. |
crates/ironrdp-rdpeudp-tokio/src/error.rs |
Adds TLS and tunnel timeout errors. |
crates/ironrdp-rdpeudp-tokio/src/lib.rs |
Exports UdpTlsConfig. |
crates/ironrdp-rdpeudp-tokio/src/multitransport.rs |
Forwards sideband TLS policy. |
crates/ironrdp-rdpeudp-tokio/src/tls.rs |
Runs callback handshakes off-runtime. |
crates/ironrdp-rdpeudp-tokio/src/transport.rs |
Applies TLS and tunnel timeouts. |
crates/ironrdp-testsuite-extra/tests/rdpeudp_tokio.rs |
Tests callbacks, current-thread operation, and cleanup. |
Extend the default TLS sideband budget beyond the 120-second interactive certificate callback window and retain time for handshake overhead. Document that the reusable rustls config builder requires an installed or unambiguous process-level crypto provider.
Marc-André Moreau (mamoreau-devolutions)
deployed
to
llm-providers
August 27, 2026 17:20 — with
GitHub Actions
Active
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract the reusable rustls verifier/client-config builder out of
ironrdp-tlsinto a newrustls_verifiermodule (gated behind arustls-verifierfeature) so the RDPEUDP2 reliable-UDP TLS sideband can share the same certificate validation policy and callback semantics as the primary TCP transport, without pulling in a specific TLS stream backend.ironrdp-rdpeudp-tokionow depends onironrdp-tls(rustls-verifieronly) and gains aUdpTlsConfigtype covering certificate validation mode, callback, and endpoint. The synchronous validation callback runs on a blocking-pool thread with a nested current-thread runtime so it cannot starve the current-thread RDPEUDP driver. TLS handshake and RDPEMT tunnel establishment are now wrapped in bounded timeouts (tls_timeout,tunnel_timeout) with dedicated error kinds.The
Drivergains aDropimpl that closesSharedIoand wakes parked readers when the stream was not already released, so aborting or dropping a connection attempt cannot strand a blocking-pool thread or leave detached TLS work parked forever.MultitransportBootstrap::connectnow takes the TLS config directly instead of an optional raw verifier, and its docs clarify that S_OK is only sent once Soft-Sync has been negotiated.This is an independent split extracted from draft #1777, targeting
masterdirectly (no stacking). It is the second of the split PRs from that source.Scope
Included:
crates/ironrdp-tls/{Cargo.toml,src/lib.rs,src/rustls.rs}+ newsrc/rustls_verifier.rscrates/ironrdp-rdpeudp-tokio/{Cargo.toml,README.md,src/lib.rs,src/multitransport.rs,src/tls.rs,src/transport.rs,src/error.rs,src/driver.rs}crates/ironrdp-testsuite-extra/tests/rdpeudp_tokio.rs(RDPEUDP-specific test updates only)Cargo.lockregenerated to add the single newironrdp-rdpeudp-tokio -> ironrdp-tlsdependency edgeDeliberately excluded (client/connector-dependent, out of scope for this slice):
crates/ironrdp-testsuite-extra/Cargo.toml— the source PR's"udp"feature addition applies to theironrdp-clientdev-dependency, which doesn't exist without the client-side UDP wiring landed in a separate PRcrates/ironrdp-testsuite-extra/tests/client/config.rs— thereliable_udp_is_opt_intest depends onironrdp-connector::ConfigBuilder::with_udp_transport, out of scope for this sliceValidation
cargo build -p ironrdp-tls -p ironrdp-rdpeudp-tokiocargo check --workspace --all-targets(confirms no other crate references the removed APIs)cargo test -p ironrdp-testsuite-extra --test integration_tests_extra rdpeudp_tokio::— 12/12 passedcargo test -p ironrdp-rdpeudp-tokio --features rustls-ring— 51/51 passedcargo check -p ironrdp-tlsacrossrustls-verifier,stub,native-tls,rustls-no-providerfeature comboscargo xtask check fmt -v,cargo xtask check lints -v,cargo xtask check locks -v,cargo xtask check typos -v— all passing