fix(transport): Remove with_rustls for tls config (#188)

This commit is contained in:
Lucio Franco
2019-12-13 20:31:22 -05:00
committed by GitHub
parent 3eb76abf9f
commit 502491a590
13 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client_key = tokio::fs::read("tonic-examples/data/tls/client1.key").await?;
let client_identity = Identity::from_pem(client_cert, client_key);
let tls = ClientTlsConfig::with_rustls()
let tls = ClientTlsConfig::new()
.domain_name("localhost")
.ca_certificate(server_root_ca_cert)
.identity(client_identity);
+1 -1
View File
@@ -37,7 +37,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let addr = "[::1]:50051".parse().unwrap();
let server = EchoServer::default();
let tls = ServerTlsConfig::with_rustls()
let tls = ServerTlsConfig::new()
.identity(server_identity)
.client_ca_root(client_ca_cert);