Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitly use native certificates #173

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/channel_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ impl ChannelPool {
.keep_alive_while_idle(self.keep_alive_while_idle);

let endpoint = if tls {
let tls_config = ClientTlsConfig::new().with_native_roots();
endpoint
.tls_config(ClientTlsConfig::new())
.tls_config(tls_config)
.map_err(|e| Status::internal(format!("Failed to create TLS config: {}", e)))?
} else {
endpoint
Expand All @@ -60,7 +61,7 @@ impl ChannelPool {
let channel = endpoint
.connect()
.await
.map_err(|e| Status::internal(format!("Failed to connect to {}: {}", self.uri, e)))?;
.map_err(|e| Status::internal(format!("Failed to connect to {}: {:?}", self.uri, e)))?;
let mut self_channel = self.channel.write().unwrap();

*self_channel = Some(channel.clone());
Expand Down
Loading