diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/knife/ssl_check.rb | 1 | ||||
-rw-r--r-- | lib/chef/mixin/proxified_socket.rb | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/chef/knife/ssl_check.rb b/lib/chef/knife/ssl_check.rb index 0995fc8a54..0c672f322e 100644 --- a/lib/chef/knife/ssl_check.rb +++ b/lib/chef/knife/ssl_check.rb @@ -245,6 +245,7 @@ ADVICE def run validate_uri + if verify_X509 && verify_cert && verify_cert_host ui.msg "Successfully verified certificates from `#{host}'" else diff --git a/lib/chef/mixin/proxified_socket.rb b/lib/chef/mixin/proxified_socket.rb index c3b0f7688c..5c9bc3c7d0 100644 --- a/lib/chef/mixin/proxified_socket.rb +++ b/lib/chef/mixin/proxified_socket.rb @@ -16,18 +16,22 @@ # require "proxifier" +require "chef-config/mixin/fuzzy_hostname_matcher" class Chef module Mixin module ProxifiedSocket + include ChefConfig::Mixin::FuzzyHostnameMatcher + # This looks at the environment variables and leverages Proxifier to # make the TCPSocket respect ENV['https_proxy'] or ENV['http_proxy'] if # they are present def proxified_socket(host, port) proxy = ENV["https_proxy"] || ENV["http_proxy"] || false - if proxy - Proxifier.Proxy(proxy, no_proxy: ENV["no_proxy"]).open(host, port) + + if proxy && !fuzzy_hostname_match_any?(host, ENV["no_proxy"]) + Proxifier.Proxy(proxy).open(host, port) else TCPSocket.new(host, port) end |