Merge pull request #50 from Orange-OpenSource/fix/option-insecure

[FIX] inverse insecure flag
This commit is contained in:
Fabrice Reix 2020-10-23 09:15:23 +02:00 committed by GitHub
commit 9f9e5ee351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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")

View File

@ -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) => {

View File

@ -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();