Enable h2 ALPN with rustls-tls backend

This commit is contained in:
Sean McArthur
2019-01-18 11:53:56 -08:00
parent 68e98d54ea
commit 021851afd4
2 changed files with 5 additions and 1 deletions

View File

@@ -142,6 +142,10 @@ impl ClientBuilder {
use ::tls::NoVerifier;
let mut tls = ::rustls::ClientConfig::new();
tls.set_protocols(&[
"h2".into(),
"http/1.1".into(),
]);
tls.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS);
if !config.certs_verification {