From 42e56d3243c5aeb328d8976255b2174834805af6 Mon Sep 17 00:00:00 2001 From: "Julian C. Dunn" Date: Mon, 13 Jul 2015 20:57:47 -0400 Subject: Support SNI in 'knife ssl check'. Fixes #3491. --- lib/chef/knife/ssl_check.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1