class SSLyze::XML::Certinfo::CertificateValidation::HostnameValidation
Represents the `<hostnameValidation>` XML
element.
@since 1.0.0
Public Class Methods
new(node)
click to toggle source
Initializes the element.
@param [Nokogiri::XML::Element] node
The `<hostnameValidation>` XML element.
# File lib/sslyze/xml/certinfo/certificate_validation/hostname_validation.rb, line 23 def initialize(node) @node = node end
Public Instance Methods
certificate_matches_server_hostname?()
click to toggle source
Determines if the certificate Common Name matches the target domain name.
@return [Boolean]
# File lib/sslyze/xml/certinfo/certificate_validation/hostname_validation.rb, line 33 def certificate_matches_server_hostname? Boolean[@node['certificateMatchesServerHostname']] end
Also aliased as: matches_server_hostname?
server_hostname()
click to toggle source
The server's domain name.
@return [String]
# File lib/sslyze/xml/certinfo/certificate_validation/hostname_validation.rb, line 44 def server_hostname @node['serverHostname'] end
Also aliased as: to_s