Project

General

Profile

Bug #10613 ยป optional-sni.patch

patch to disable SNI - edk750 (Eddy Kim), 12/17/2014 10:47 PM

View differences:

lib/net/http.rb
# Sets the maximum depth for the certificate chain verification.
attr_accessor :verify_depth
# Disable TLS SNI. Enabled by default, and only if TLS extensions are available.
attr_accessor :disable_sni
# Sets the flags for server the certification verification at beginning of
# SSL/TLS session.
#
......
end
s.session = @ssl_session if @ssl_session
# Server Name Indication (SNI) RFC 3546
s.hostname = @address if s.respond_to? :hostname=
unless @disable_sni
s.hostname = @address if s.respond_to? :hostname=
end
Timeout.timeout(@open_timeout, Net::OpenTimeout) { s.connect }
if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
s.post_connection_check(@address)
    (1-1/1)