vendor/bundle/jruby/1.9/gems/jruby-openssl-0.9.13-java/lib/jopenssl23/openssl/ssl.rb
##
# Perform hostname verification after an SSL connection is established
#
# This method MUST be called after calling #connect to ensure that the
# hostname of a remote peer has been verified.
Perform hostname verification after an SSL connection is established
This method MUST be called after calling #connect to ensure that the
hostname of a remote peer has been verified.
Perform hostname verification after an SSL connection is established This method MUST be called after calling #connect to ensure that the hostname of a remote peer has been verified .
def post_connection_check(hostname)
        if peer_cert.nil?
          msg = "Peer verification enabled, but no certificate received."
          if using_anon_cipher?
            msg += " Anonymous cipher suite #{cipher[0]} was negotiated. Anonymous suites must be disabled to use peer verification."
          end
          raise SSLError, msg
        end
        unless OpenSSL::SSL.verify_certificate_identity(peer_cert, hostname)
          raise SSLError, "hostname \"#{hostname}\" does not match the server certificate"
        end
        return true
      end
def post_connection_check ( hostname ) if peer_cert . nil? msg = "Peer verification enabled, but no certificate received." if using_anon_cipher? msg += " Anonymous cipher suite #{cipher[0]} was negotiated. Anonymous suites must be disabled to use peer verification." end raise SSLError , msg end unless OpenSSL :: SSL . verify_certificate_identity ( peer_cert , hostname ) raise SSLError , "hostname \"#{hostname}\" does not match the server certificate" end return true end
Perform hostname verification after an SSL connection is established
This method MUST be called after calling #connect to ensure that the
hostname of a remote peer has been verified.
Perform hostname verification after an SSL connection is established This method MUST be called after calling #connect to ensure that the hostname of a remote peer has been verified .
hostname
<not_specific>