[package] name = "actix-tls" version = "3.1.1" authors = [ "Nikolay Kim ", "Rob Ede ", ] description = "TLS acceptor and connector services for Actix ecosystem" keywords = ["network", "tls", "ssl", "async", "transport"] repository = "https://github.com/actix/actix-net.git" categories = ["network-programming", "asynchronous", "cryptography"] license.workspace = true edition.workspace = true rust-version.workspace = true [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] [package.metadata.cargo_check_external_types] allowed_external_types = [ "actix_service::*", "actix_utils::*", "futures_core::*", "tokio::*", ] [package.metadata.cargo-machete] ignored = [ "rustls_021", # specified to force version with add_trust_anchors method "rustls_webpki_0101", # specified to force secure version ] [features] default = ["accept", "connect"] # enable acceptor services accept = [] # enable connector services connect = [] # use openssl impls openssl = ["tls-openssl", "tokio-openssl"] # alias for backwards compat rustls = ["rustls-0_20"] # use rustls v0.20 impls rustls-0_20 = ["rustls-0_20-webpki-roots"] rustls-0_20-webpki-roots = ["tokio-rustls-023", "webpki-roots-022"] rustls-0_20-native-roots = ["tokio-rustls-023", "dep:rustls-native-certs-06"] # use rustls v0.21 impls rustls-0_21 = ["rustls-0_21-webpki-roots"] rustls-0_21-webpki-roots = ["tokio-rustls-024", "webpki-roots-025"] rustls-0_21-native-roots = ["tokio-rustls-024", "dep:rustls-native-certs-06"] # use rustls v0.22 impls rustls-0_22-webpki-roots = ["dep:tokio-rustls-025", "dep:rustls-pki-types-1", "dep:webpki-roots-026"] rustls-0_22-native-roots = ["dep:tokio-rustls-025", "dep:rustls-pki-types-1", "dep:rustls-native-certs-07"] # use native-tls impls native-tls = ["tokio-native-tls"] # support http::Uri as connect address uri = ["http", "http-1"] [dependencies] actix-rt = { version = "2.2", default-features = false } actix-service = "2" actix-utils = "3" futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] } impl-more = "0.1" pin-project-lite = "0.2.7" tokio = "1.23.1" tokio-util = "0.7" tracing = { version = "0.1.30", default-features = false, features = ["log"] } # uri http = { version = "0.2.3", optional = true } http-1 = { package = "http", version = "1", optional = true } # openssl tls-openssl = { package = "openssl", version = "0.10.55", optional = true } tokio-openssl = { version = "0.6", optional = true } # rustls v0.20 tokio-rustls-023 = { package = "tokio-rustls", version = "0.23", optional = true } webpki-roots-022 = { package = "webpki-roots", version = "0.22", optional = true } # rustls v0.21 rustls-021 = { package = "rustls", version = "0.21.6", optional = true } rustls-webpki-0101 = { package = "rustls-webpki", version = "0.101.4", optional = true } tokio-rustls-024 = { package = "tokio-rustls", version = "0.24", optional = true } webpki-roots-025 = { package = "webpki-roots", version = "0.25", optional = true } # rustls v0.22 rustls-pki-types-1 = { package = "rustls-pki-types", version = "1", optional = true } tokio-rustls-025 = { package = "tokio-rustls", version = "0.25", optional = true } webpki-roots-026 = { package = "webpki-roots", version = "0.26", optional = true } # native root certificates for rustls impls rustls-native-certs-06 = { package = "rustls-native-certs", version = "0.6", optional = true } rustls-native-certs-07 = { package = "rustls-native-certs", version = "0.7", optional = true } # native-tls tokio-native-tls = { version = "0.3", optional = true } [dev-dependencies] actix-codec = "0.5" actix-rt = "2.2" actix-server = "2" bytes = "1" env_logger = "0.10" futures-util = { version = "0.3.17", default-features = false, features = ["sink"] } rcgen = "0.11" rustls-pemfile = "2" tokio-rustls-025 = { package = "tokio-rustls", version = "0.25" } trust-dns-resolver = "0.23" [[example]] name = "accept-rustls" required-features = ["accept", "rustls-0_22"]