1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 15:07:42 +02:00

minimum viable rustls v0.21 support (#3112)

This commit is contained in:
Rob Ede
2023-08-27 00:07:11 +01:00
committed by GitHub
parent 14355b9442
commit 55c15f5bbf
13 changed files with 350 additions and 48 deletions

View File

@ -1,7 +1,7 @@
//! Sets up a WebSocket server over TCP and TLS.
//! Sends a heartbeat message every 4 seconds but does not respond to any incoming frames.
extern crate tls_rustls as rustls;
extern crate tls_rustls_021 as rustls;
use std::{
io,
@ -28,7 +28,9 @@ async fn main() -> io::Result<()> {
HttpService::build().h1(handler).tcp()
})?
.bind("tls", ("127.0.0.1", 8443), || {
HttpService::build().finish(handler).rustls(tls_config())
HttpService::build()
.finish(handler)
.rustls_021(tls_config())
})?
.run()
.await