feat/tls-for-websocket-tcp #9

Merged
Aelthorim merged 5 commits from feat/tls-for-websocket-tcp into main 2026-07-26 19:46:08 +02:00
Owner

More or so finished TLS implementation

More or so finished TLS implementation
- Upgrade async-trait from 0.1.89 to 0.1.91 in server and common and from 0.1.90 to 0.1.91 in client
- Create a tls.rs file that uses rustls_pemfile library to load private keys and certificates
- Wrap both the raw TCP and WebSocket listeners with tokio-rustls,
loading the server certificate and private key from cert.pem/key.pem
at startup.
- TcpReader/TcpWriter and WsReader/WsWriter now operate over
TlsStream<TcpStream> instead of the raw stream halves.
- Wrap outgoing TCP and WebSocket connections with tokio-rustls,
  trusting the server's cert.pem via a pinned RootCertStore.
- TcpReader/TcpWriter and WsReader/WsWriter now operate over
tokio_rustls::client::TlsStream<TcpStream> instead of raw
  TcpStream halves / tokio-tungstenite's MaybeTlsStream.
- Add client/src/tls.rs::build_connector() to load cert.pem and
  construct the TlsConnector.
- server: replace .expect() with unwrap_or_else(|e| panic!(...))
  on cert/key loading so failures include the underlying error.
Merge branch 'main' into feat/tls-for-websocket-tcp
All checks were successful
CI / Format (push) Successful in 2m32s
CI / Format (pull_request) Successful in 40s
CI / Clippy (push) Successful in 4m0s
CI / Clippy (pull_request) Successful in 2m48s
84383e761d
Aelthorim deleted branch feat/tls-for-websocket-tcp 2026-07-26 19:46:08 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Aelthorim/chat-project!9
No description provided.