diff options
author | Julian C. Dunn <jdunn@chef.io> | 2015-07-13 20:57:47 -0400 |
---|---|---|
committer | Julian C. Dunn <jdunn@chef.io> | 2015-07-13 20:59:18 -0400 |
commit | 42e56d3243c5aeb328d8976255b2174834805af6 (patch) | |
tree | ec7d7da2206e42aa340249b7cbb79bedd6012c91 /lib | |
parent | 60af687362aa962b577450fff54b88ed21e8c713 (diff) | |
download | chef-42e56d3243c5aeb328d8976255b2174834805af6.tar.gz |
Support SNI in 'knife ssl check'.
Fixes #3491.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/knife/ssl_check.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/knife/ssl_check.rb b/lib/chef/knife/ssl_check.rb index c5fe4fc1aa..d71eacfc7e 100644 --- a/lib/chef/knife/ssl_check.rb +++ b/lib/chef/knife/ssl_check.rb @@ -73,11 +73,12 @@ class Chef exit 1 end - def verify_peer_socket @verify_peer_socket ||= begin tcp_connection = TCPSocket.new(host, port) - OpenSSL::SSL::SSLSocket.new(tcp_connection, verify_peer_ssl_context) + ssl_client = OpenSSL::SSL::SSLSocket.new(tcp_connection, verify_peer_ssl_context) + ssl_client.hostname = host + ssl_client end end |