fix(transport): Remove with_rustls for tls config (#188)
This commit is contained in:
@@ -10,7 +10,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let pem = tokio::fs::read("tonic-examples/data/tls/ca.pem").await?;
|
||||
let ca = Certificate::from_pem(pem);
|
||||
|
||||
let tls = ClientTlsConfig::with_rustls()
|
||||
let tls = ClientTlsConfig::new()
|
||||
.ca_certificate(ca)
|
||||
.domain_name("example.com");
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let server = EchoServer::default();
|
||||
|
||||
Server::builder()
|
||||
.tls_config(ServerTlsConfig::with_rustls().identity(identity))
|
||||
.tls_config(ServerTlsConfig::new().identity(identity))
|
||||
.add_service(pb::echo_server::EchoServer::new(server))
|
||||
.serve(addr)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user