Skip to content

Commit 9d0143c

Browse files
committed
feat: vendored flag for volo native-tls, CI check
1 parent 89e33b4 commit 9d0143c

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- name: Run tests
3535
run: |
3636
cargo check --features multiplex
37+
cargo check --features rustls,native-tls,vendored
3738
cargo test
3839
3940
test-linux-aarch64:
@@ -48,6 +49,7 @@ jobs:
4849
- name: Run tests
4950
run: |
5051
cargo check --features multiplex
52+
cargo check --features rustls,native-tls,vendored
5153
cargo test
5254
5355
test-macos:
@@ -62,6 +64,7 @@ jobs:
6264
- name: Run tests
6365
run: |
6466
cargo check --features multiplex
67+
cargo check --features rustls,native-tls,vendored
6568
cargo test
6669
6770
test-windows:
@@ -76,6 +79,7 @@ jobs:
7679
- name: Run tests
7780
run: |
7881
cargo check --features multiplex
82+
cargo check --features rustls,native-tls,vendored
7983
cargo test
8084
8185
lint:

Cargo.lock

Lines changed: 17 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

volo/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ tokio-native-tls = { workspace = true, optional = true }
5858
[features]
5959
default = []
6060

61+
vendored = ["tokio-native-tls/vendored"]
6162
rustls = ["tokio-rustls", "librustls"]
6263
native-tls = ["tokio-native-tls"]

volo/src/net/dial.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ cfg_rustls_or_native_tls! {
204204
match &self.tls_config.connector {
205205
#[cfg(feature = "rustls")]
206206
TlsConnector::Rustls(connector) => {
207-
let server_name = librustls::ServerName::try_from(&self.tls_config.server_name[..])
208-
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?;
207+
let server_name = librustls::pki_types::ServerName::try_from(&self.tls_config.server_name[..])
208+
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?.to_owned();
209209
connector
210210
.connect(server_name, tcp)
211211
.await

0 commit comments

Comments
 (0)