From 4b2b016024850ec8c671617c58711937a30894a6 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Sun, 27 Aug 2017 18:53:47 -1000 Subject: [PATCH] Update examples for webpki-roots API changes. --- README.md | 2 +- examples/client.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);