From c79bcaae0433d4f13901540221af4e1830e1d44f Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 27 Aug 2021 18:23:14 +0200 Subject: Conditionally enable TLS only on supported platforms --- Cargo.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index d317ebb..67701dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ readme = "README.md" keywords = ["serve", "http-server", "static-files", "http", "server"] categories = ["command-line-utilities", "network-programming", "web-programming::http-server"] edition = "2018" +resolver = "2" [profile.release] lto = true @@ -17,7 +18,7 @@ codegen-units = 1 panic = 'abort' [dependencies] -actix-web = { version = "3", features = ["rustls"] } +actix-web = "3" actix-files = "0.5" actix-multipart = "0.3" actix-web-httpauth = "0.5" @@ -50,7 +51,14 @@ httparse = "1" http = "0.2" bytes = "1" atty = "0.2" + +# Use rustls only on architecturs supported by ring. +# See also https://github.com/briansmith/ring/issues/1182 +# and https://github.com/briansmith/ring/issues/562 +# and https://github.com/briansmith/ring/issues/1367 +[target.'cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64", target_arch = "arm"))'.dependencies] rustls = "0.18" +actix-web = { version = "3", features = ["rustls"] } [dev-dependencies] assert_cmd = "2" -- cgit v1.2.3 From 2ea23ceb416d2a6c84a752d5a36afaf754b7c644 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Sat, 28 Aug 2021 05:38:42 +0200 Subject: Switch TLS conditional compilation to feature --- Cargo.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 67701dd..38f018a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,14 +51,15 @@ httparse = "1" http = "0.2" bytes = "1" atty = "0.2" +rustls = { version = "0.18", optional = true } -# Use rustls only on architecturs supported by ring. +[features] +default = ["tls"] +# This feature allows us to use rustls only on architectures supported by ring. # See also https://github.com/briansmith/ring/issues/1182 # and https://github.com/briansmith/ring/issues/562 # and https://github.com/briansmith/ring/issues/1367 -[target.'cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64", target_arch = "arm"))'.dependencies] -rustls = "0.18" -actix-web = { version = "3", features = ["rustls"] } +tls = ["rustls", "actix-web/rustls"] [dev-dependencies] assert_cmd = "2" -- cgit v1.2.3