From d1ebc0ff0be566c749651321394ffb955633286c Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 1 Feb 2017 07:07:05 +0100 Subject: [PATCH] imp(cli): use hyper-rustls instead of openssl The only openssl dependency left would be coming from yup-oauth2! --- etc/api/type-cli.yaml | 3 ++- src/mako/cli/lib/engine.mako | 4 ++-- src/mako/cli/main.rs.mako | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/etc/api/type-cli.yaml b/etc/api/type-cli.yaml index f5812e35c8..754dff00fd 100644 --- a/etc/api/type-cli.yaml +++ b/etc/api/type-cli.yaml @@ -28,5 +28,6 @@ cargo: doc_base_url: http://byron.github.io/google-apis-rs dependencies: - strsim = "^0.5" - - yup-hyper-mock = "^1.0" + - hyper-rustls = "^0.3" + - yup-hyper-mock = "^2.0" - clap = "^2.0" diff --git a/src/mako/cli/lib/engine.mako b/src/mako/cli/lib/engine.mako index aef1793d68..c7db54d36f 100644 --- a/src/mako/cli/lib/engine.mako +++ b/src/mako/cli/lib/engine.mako @@ -157,10 +157,10 @@ impl<'n> Engine<'n> { <%def name="_debug_client(flag_name)" buffered="True">\ if opt.is_present("${flag_name}") { hyper::Client::with_connector(mock::TeeConnector { - connector: hyper::net::HttpsConnector::::default() + connector: hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new()) }) } else { - hyper::Client::new() + hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())) }\ diff --git a/src/mako/cli/main.rs.mako b/src/mako/cli/main.rs.mako index 80aaef2170..977f0b4294 100644 --- a/src/mako/cli/main.rs.mako +++ b/src/mako/cli/main.rs.mako @@ -18,6 +18,7 @@ extern crate clap; extern crate yup_oauth2 as oauth2; extern crate yup_hyper_mock as mock; +extern crate hyper_rustls; extern crate serde; extern crate serde_json; extern crate hyper;