Skip to content

Commit

Permalink
fix: tmp cert revert
Browse files Browse the repository at this point in the history
  • Loading branch information
janlegner committed May 15, 2024
1 parent 71474e6 commit 2284142
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ run-server: build-server
run-client-local: build-client
cargo run --bin mtx-client -- \
--tls-grpc-ca-cert ./certs/ca.cert \
--grpc-urls-file ./client-config.yaml \
--tls-grpc-client-key ./certs/client.$(client).key \
--tls-grpc-client-cert ./certs/client.$(client).cert \
--rpc-url http://127.0.0.1:8899
Expand Down
4 changes: 2 additions & 2 deletions client/grpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ async fn get_tls_config(
Some(
ClientTlsConfig::new()
.ca_certificate(ca_cert)
.domain_name("localhost")
.identity(client_identity),
)
} else {
Expand All @@ -150,8 +151,7 @@ pub async fn spawn_grpc_client(

info!("Opening the gRPC channel: {:?}", grpc_url.host());
let channel = match tls {
Some(tls) => Channel::builder(grpc_url.clone())
.tls_config(tls.domain_name(domain_name.unwrap_or("localhost")))?,
Some(tls) => Channel::builder(grpc_url.clone()).tls_config(tls)?,
_ => Channel::builder(grpc_url.clone()),
}
.connect()
Expand Down

0 comments on commit 2284142

Please sign in to comment.