From 7fc800dbc4f40218f73e920a2a5e4724c6279edd Mon Sep 17 00:00:00 2001 From: Cyril Plisko Date: Tue, 2 May 2023 09:16:24 +0300 Subject: [PATCH] feat: Allow different choices of TLS support (#6) Allow same TLS options as underlying `reqwest` crate --- jwt-authorizer/Cargo.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/jwt-authorizer/Cargo.toml b/jwt-authorizer/Cargo.toml index b75c275..c090ff3 100644 --- a/jwt-authorizer/Cargo.toml +++ b/jwt-authorizer/Cargo.toml @@ -17,7 +17,7 @@ headers = "0.3" jsonwebtoken = "8.2" http = "0.2" pin-project = "1.0" -reqwest = { version = "0.11", features = ["json"] } +reqwest = { version = "0.11", default-features = false, features = ["json"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" thiserror = "1.0.38" @@ -33,3 +33,14 @@ hyper = { version = "0.14", features = ["full"] } lazy_static = "1.4.0" tower = { version = "0.4", features = ["util"] } wiremock = "0.5" + +[features] +default = ["default-tls"] +default-tls = ["reqwest/default-tls"] +native-tls = ["reqwest/native-tls"] +native-tls-vendored = ["reqwest/native-tls-vendored"] +native-tls-alpn = ["reqwest/native-tls-alpn"] +rustls-tls = ["reqwest/rustls-tls"] +rustls-tls-manual-roots = ["reqwest/rustls-tls-manual-roots"] +rustls-tls-webpki-roots = ["reqwest/rustls-tls-webpki-roots"] +rustls-tls-native-roots = ["reqwest/rustls-tls-native-roots"]