Class: SSLyze::XML::Certinfo::CertificateValidation::HostnameValidation
- Inherits:
-
Object
- Object
- SSLyze::XML::Certinfo::CertificateValidation::HostnameValidation
- Includes:
- Types
- Defined in:
- lib/sslyze/xml/certinfo/certificate_validation/hostname_validation.rb
Overview
Represents the <hostnameValidation>
XML element.
Constant Summary
Constants included from Types
Instance Method Summary collapse
-
#certificate_matches_server_hostname? ⇒ Boolean
(also: #matches_server_hostname?)
Determines if the certificate Common Name matches the target domain name.
-
#initialize(node) ⇒ HostnameValidation
constructor
Initializes the element.
-
#server_hostname ⇒ String
(also: #to_s)
The server's domain name.
Constructor Details
#initialize(node) ⇒ HostnameValidation
Initializes the element.
23 24 25 |
# File 'lib/sslyze/xml/certinfo/certificate_validation/hostname_validation.rb', line 23 def initialize(node) @node = node end |
Instance Method Details
#certificate_matches_server_hostname? ⇒ Boolean Also known as: matches_server_hostname?
Determines if the certificate Common Name matches the target domain name.
33 34 35 |
# File 'lib/sslyze/xml/certinfo/certificate_validation/hostname_validation.rb', line 33 def certificate_matches_server_hostname? Boolean[@node['certificateMatchesServerHostname']] end |
#server_hostname ⇒ String Also known as: to_s
The server's domain name.
44 45 46 |
# File 'lib/sslyze/xml/certinfo/certificate_validation/hostname_validation.rb', line 44 def server_hostname @node['serverHostname'] end |