mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
use rustls v0.21
This commit is contained in:
@ -5,10 +5,10 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
actix-web.workspace = true
|
||||
awc = { version = "3", features = ["rustls"] }
|
||||
awc = { workspace = true, features = ["rustls-0_21"] }
|
||||
|
||||
env_logger.workspace = true
|
||||
log.workspace = true
|
||||
mime = "0.3"
|
||||
rustls = "0.20"
|
||||
webpki-roots = "0.24"
|
||||
rustls.workspace = true
|
||||
webpki-roots = "0.25"
|
||||
|
@ -7,7 +7,7 @@ edition = "2021"
|
||||
actix-web = { workspace = true, features = ["openssl"] }
|
||||
actix-files.workspace = true
|
||||
|
||||
acme-micro = "0.12"
|
||||
acme-lib = "0.8"
|
||||
anyhow = "1"
|
||||
env_logger.workspace = true
|
||||
log.workspace = true
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::{fs, time::Duration};
|
||||
|
||||
use acme_micro::{create_p384_key, Certificate, Directory, DirectoryUrl};
|
||||
use acme_lib::{create_p384_key, Certificate, Directory, DirectoryUrl};
|
||||
use actix_files::Files;
|
||||
use actix_web::{rt, web, App, HttpRequest, HttpServer, Responder};
|
||||
use anyhow::anyhow;
|
||||
|
@ -5,8 +5,8 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
actix-tls.workspace = true
|
||||
actix-web = { workspace = true, features = ["rustls"] }
|
||||
actix-web = { workspace = true, features = ["rustls-0_21"] }
|
||||
env_logger.workspace = true
|
||||
log.workspace = true
|
||||
rustls = "0.20"
|
||||
rustls.workspace = true
|
||||
rustls-pemfile = "1"
|
||||
|
@ -108,7 +108,7 @@ async fn main() -> std::io::Result<()> {
|
||||
HttpServer::new(|| App::new().default_service(web::to(route_whoami)))
|
||||
.on_connect(get_client_cert)
|
||||
.bind(("localhost", 8080))?
|
||||
.bind_rustls(("localhost", 8443), config)?
|
||||
.bind_rustls_021(("localhost", 8443), config)?
|
||||
.workers(1)
|
||||
.run()
|
||||
.await
|
||||
|
@ -8,10 +8,10 @@ name = "rustls-server"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-web = { workspace = true, features = ["rustls"] }
|
||||
actix-web = { workspace = true, features = ["rustls-0_21"] }
|
||||
actix-files.workspace = true
|
||||
|
||||
env_logger.workspace = true
|
||||
log.workspace = true
|
||||
rustls = "0.20.2"
|
||||
rustls.workspace = true
|
||||
rustls-pemfile = "1"
|
||||
|
@ -36,7 +36,7 @@ async fn main() -> std::io::Result<()> {
|
||||
.service(web::redirect("/", "/index.html"))
|
||||
.service(Files::new("/static", "static"))
|
||||
})
|
||||
.bind_rustls("127.0.0.1:8443", config)?
|
||||
.bind_rustls_021("127.0.0.1:8443", config)?
|
||||
.run()
|
||||
.await
|
||||
}
|
||||
|
Reference in New Issue
Block a user