Skip to content

Commit d12a07e

Browse files
committed
temp
1 parent 2e19b66 commit d12a07e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tonic/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ tls = ["rustls-pemfile", "transport", "tokio-rustls"]
3131
tls-roots = ["tls-roots-common", "rustls-native-certs"]
3232
tls-roots-common = ["tls"]
3333
tls-webpki-roots = ["tls-roots-common", "webpki-roots"]
34+
custom-tls = []
3435
transport = [
3536
"axum",
3637
"channel"

tonic/src/transport/service/connector.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ where
7979
#[cfg(feature = "tls-roots-common")]
8080
let tls = self.tls_or_default(uri.scheme_str(), uri.host());
8181

82+
#[cfg(any(not(feature = "custom-tls"), feature = "tls"))]
8283
let is_https = uri.scheme_str() == Some("https");
8384
let connect = self.inner.make_connection(uri);
8485

8586
Box::pin(async move {
86-
#[cfg(not(feature = "tls"))]
87+
#[cfg(all(not(feature = "tls"), not(feature = "custom-tls")))]
8788
{
8889
if is_https {
8990
return Err(HttpsUriWithoutTlsSupport(()).into());

0 commit comments

Comments
 (0)