From 9af6bd6145d95445f1837dbe1d185bb80bf6a58c Mon Sep 17 00:00:00 2001 From: Fabrice Reix Date: Fri, 23 Oct 2020 07:52:07 +0200 Subject: [PATCH] [FIX] inverse insecure flag --- src/bin/hurl.rs | 2 +- src/cli/error.rs | 2 +- src/http/client.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/hurl.rs b/src/bin/hurl.rs index 129d23f11..7f1d4c520 100644 --- a/src/bin/hurl.rs +++ b/src/bin/hurl.rs @@ -368,7 +368,7 @@ fn app() -> clap::App<'static, 'static> { clap::Arg::with_name("insecure") .short("k") .long("insecure") - .help("Allow insecure SSl connections"), + .help("Allow insecure SSL connections"), ) .arg( clap::Arg::with_name("json") diff --git a/src/cli/error.rs b/src/cli/error.rs index df7554711..9758efacd 100644 --- a/src/cli/error.rs +++ b/src/cli/error.rs @@ -144,7 +144,7 @@ impl Error for runner::Error { RunnerError::Timeout => "Timeout has been reached".to_string(), RunnerError::TooManyRedirect => "Too many redirect".to_string(), RunnerError::CouldNotParseResponse => "Could not parse response".to_string(), - RunnerError::SSLCertificate => "SSl Certificate".to_string(), + RunnerError::SSLCertificate => "SSL certificate problem".to_string(), RunnerError::AssertVersion { actual, .. } => format!("actual value is <{}>", actual), RunnerError::AssertStatus { actual, .. } => format!("actual value is <{}>", actual), RunnerError::PredicateValue(value) => { diff --git a/src/http/client.rs b/src/http/client.rs index 5f45a9e81..8c93836e8 100644 --- a/src/http/client.rs +++ b/src/http/client.rs @@ -94,8 +94,8 @@ impl Client { h.noproxy(s.as_str()).unwrap(); } h.verbose(options.verbose).unwrap(); - h.ssl_verify_host(options.insecure).unwrap(); - h.ssl_verify_peer(options.insecure).unwrap(); + h.ssl_verify_host(!options.insecure).unwrap(); + h.ssl_verify_peer(!options.insecure).unwrap(); h.timeout(options.timeout).unwrap(); h.connect_timeout(options.connect_timeout).unwrap();