class HTTPClient::SSLSocket
def post_connection_check(hostname)
def post_connection_check(hostname) verify_mode = @config.verify_mode || OpenSSL::SSL::VERIFY_NONE if verify_mode == OpenSSL::SSL::VERIFY_NONE return elsif @ssl_socket.peer_cert.nil? and check_mask(verify_mode, OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT) raise OpenSSL::SSL::SSLError.new('no peer cert') end if @ssl_socket.respond_to?(:post_connection_check) and RUBY_VERSION > "1.8.4" @ssl_socket.post_connection_check(hostname) else @config.post_connection_check(@ssl_socket.peer_cert, hostname) end end