diff --git a/README.md b/README.md index 9612f64..d9db909 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ use tokio_rustls::ClientConfigExt; // ... let mut config = ClientConfig::new(); -config.root_store.add_trust_anchors(&webpki_roots::ROOTS); +config.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); let config = Arc::new(config); TcpStream::connect(&addr, &handle) diff --git a/examples/client.rs b/examples/client.rs index cfc5bca..4a737f6 100644 --- a/examples/client.rs +++ b/examples/client.rs @@ -64,7 +64,7 @@ fn main() { let mut pem = BufReader::new(fs::File::open(cafile).unwrap()); config.root_store.add_pem_file(&mut pem).unwrap(); } else { - config.root_store.add_trust_anchors(&webpki_roots::ROOTS); + config.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); } let arc_config = Arc::new(config);