Class: SSLyze::XML::Certinfo::OCSPStapling

Inherits:
Object
  • Object
show all
Includes:
Attributes::IsSupported
Defined in:
lib/sslyze/xml/certinfo/ocsp_stapling.rb,
lib/sslyze/xml/certinfo/ocsp_stapling/ocsp_response.rb

Overview

Represents the <ocspStapling> XML element.

Since:

  • 1.0.0

Defined Under Namespace

Classes: OCSPResponse

Constant Summary

Constants included from Types

Types::Boolean, Types::None

Instance Method Summary collapse

Methods included from Attributes::IsSupported

#is_supported?

Constructor Details

#initialize(node) ⇒ OCSPStapling

Initializes the SSLyze::XML::Certinfo::OCSPStapling object.

Parameters:

  • node (Nokogiri::XML::Element)

    The <ocspStapling> XML element.

Since:

  • 1.0.0



23
24
25
# File 'lib/sslyze/xml/certinfo/ocsp_stapling.rb', line 23

def initialize(node)
  @node = node
end

Instance Method Details

#ocsp_responseOCSPResponse? Also known as: response

Note:

Parses the <ocspResponse> XML element.

The OCSP Response.

Returns:

Since:

  • 1.0.0



34
35
36
37
38
# File 'lib/sslyze/xml/certinfo/ocsp_stapling.rb', line 34

def ocsp_response
  @ocsp_response ||= if (element = @node.at_xpath('ocspResponse'))
                       OCSPResponse.new(element)
                     end
end