Skip to content

Commit

Permalink
Switch rustls to aws-lc-rs (#49750)
Browse files Browse the repository at this point in the history
  • Loading branch information
probakowski authored Dec 4, 2024
1 parent 6f38385 commit bd8bfca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/srv/desktop/rdp/rdpclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ picky = { version = "7.0.0-rc.9", default-features = false }
picky-asn1-der = "0.5.0"
picky-asn1-x509 = "0.13.0"
reqwest = { version = "0.12", default-features = false }
rustls = { version = "0.23.18", default-features = false, features = ["ring"] }
rustls = { version = "0.23.18", default-features = false, features = ["aws-lc-rs"] }

[build-dependencies]
cbindgen = "0.27.0"
Expand Down
10 changes: 1 addition & 9 deletions lib/srv/desktop/rdp/rdpclient/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ use std::error::Error;
use std::fmt::{Debug, Display, Formatter};
use std::io::{Error as IoError, ErrorKind as IoErrorKind};
use std::net::ToSocketAddrs;
use std::sync::{Arc, Mutex, MutexGuard, Once};
use std::sync::{Arc, Mutex, MutexGuard};
use std::time::Duration;
use tokio::io::{split, ReadHalf, WriteHalf};
use tokio::net::TcpStream as TokioTcpStream;
Expand All @@ -81,8 +81,6 @@ use url::Url;

const RDP_CONNECT_TIMEOUT: Duration = Duration::from_secs(5);

static START: Once = Once::new();

/// The "Microsoft::Windows::RDS::DisplayControl" DVC is opened
/// by the server. Until it does so, we withhold the latest screen
/// resize, and only send it once we're notified that the DVC is open.
Expand Down Expand Up @@ -127,12 +125,6 @@ impl Client {

/// Initializes the RDP connection with the given [`ConnectParams`].
async fn connect(cgo_handle: CgoHandle, params: ConnectParams) -> ClientResult<Self> {
START.call_once(|| {
// we register provider explicitly to avoid panics when both ring and aws_lc
// features of rustls are enabled, which happens often in dependencies like tokio-tls
// and reqwest
let _ = rustls::crypto::ring::default_provider().install_default();
});
let server_addr = params.addr.clone();
let server_socket_addr = server_addr
.to_socket_addrs()?
Expand Down

0 comments on commit bd8bfca

Please sign in to comment.