lib/httpx/io/ssl.rb in httpx-0.6.2 vs lib/httpx/io/ssl.rb in httpx-0.6.3

- old
+ new

@@ -28,10 +28,10 @@ super end def verify_hostname(host) return false if @ctx.verify_mode == OpenSSL::SSL::VERIFY_NONE - return false if @io.peer_cert.nil? + return false if !@io.respond_to?(:peer_cert) || @io.peer_cert.nil? OpenSSL::SSL.verify_certificate_identity(@io.peer_cert, host) end def close