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
822 822
    # Sets the maximum depth for the certificate chain verification.
823 823
    attr_accessor :verify_depth
824 824

  
825
    # Disable TLS SNI.  Enabled by default, and only if TLS extensions are available.
826
    attr_accessor :disable_sni
827

  
825 828
    # Sets the flags for server the certification verification at beginning of
826 829
    # SSL/TLS session.
827 830
    #
......
916 919
          end
917 920
          s.session = @ssl_session if @ssl_session
918 921
          # Server Name Indication (SNI) RFC 3546
919
          s.hostname = @address if s.respond_to? :hostname=
922
          unless @disable_sni
923
            s.hostname = @address if s.respond_to? :hostname=
924
          end
920 925
          Timeout.timeout(@open_timeout, Net::OpenTimeout) { s.connect }
921 926
          if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
922 927
            s.post_connection_check(@address)