class SSLyze::XML::Certinfo::OCSPStapling::OCSPResponse

Represents the `<ocspResponse>` XML element.

@since 1.0.0

Public Class Methods

new(node) click to toggle source

Initializes the {OCSPResponse} object.

@param [Nokogiri::XML::Element] node

The `<ocspResponse>` XML element.
# File lib/sslyze/xml/certinfo/ocsp_stapling/ocsp_response.rb, line 25
def initialize(node)
  @node = node
end

Public Instance Methods

id()
Alias for: responder_id
is_trusted_by_mozilla_ca_store?() click to toggle source

Specifies whether the OCSP Response is trusted by Mozilla's CA Store.

@return [Boolean]

# File lib/sslyze/xml/certinfo/ocsp_stapling/ocsp_response.rb, line 77
def is_trusted_by_mozilla_ca_store?
  Boolean[@node['isTrustedByMozillaCAStore']]
end
Also aliased as: trusted?
produced_at() click to toggle source

When the response was produced at.

@return [Time]

# File lib/sslyze/xml/certinfo/ocsp_stapling/ocsp_response.rb, line 47
def produced_at
  @produced_at ||= Time.parse(@node.at_xpath('producedAt').inner_text)
end
Also aliased as: to_time
responder_id() click to toggle source

The responder's ID.

@return [String]

@note Parses the `responderID` attribute.

# File lib/sslyze/xml/certinfo/ocsp_stapling/ocsp_response.rb, line 36
def responder_id
  @responder_id ||= @node.at_xpath('responderID').inner_text
end
Also aliased as: id
status() click to toggle source

The status.

@return [:successful]

# File lib/sslyze/xml/certinfo/ocsp_stapling/ocsp_response.rb, line 58
def status
  @status ||= @node['status'].downcase.to_sym
end
successful?() click to toggle source

Determines if the response status was successful.

@return [Boolean]

# File lib/sslyze/xml/certinfo/ocsp_stapling/ocsp_response.rb, line 67
def successful?
  status == :successful
end
to_time()
Alias for: produced_at
trusted?()