Method: HTTPX::SSL#verify_hostname

Defined in:
lib/httpx/io/ssl.rb

#verify_hostname(host) ⇒ Object



31
32
33
34
35
# File 'lib/httpx/io/ssl.rb', line 31

def verify_hostname(host)
  return false if @ctx.verify_mode == OpenSSL::SSL::VERIFY_NONE
  return false if @io.peer_cert.nil?
  OpenSSL::SSL.verify_certificate_identity(@io.peer_cert, host)
end