Class: SSLyze::XML::Heartbleed

Inherits:
Plugin
  • Object
show all
Defined in:
lib/sslyze/xml/heartbleed.rb,
lib/sslyze/xml/heartbleed/openssl_heartbleed.rb

Overview

Represents the <heartbleed> XML element.

Since:

  • 1.0.0

Defined Under Namespace

Classes: OpenSSLHeartbleed

Instance Method Summary collapse

Methods inherited from Plugin

#initialize

Methods included from Attributes::Exception

#exception, #exception?

Methods included from Attributes::Title

#title, #to_s

Constructor Details

This class inherits a constructor from SSLyze::XML::Plugin

Instance Method Details

#is_vulnerable?Boolean Also known as: vulnerable?

Returns:

See Also:

  • #has_openssl_heartbleed?

Since:

  • 1.0.0



30
31
32
# File 'lib/sslyze/xml/heartbleed.rb', line 30

def is_vulnerable?
  openssl_heartbleed && openssl_heartbleed.is_vulnerable?
end

#openssl_heartbleedOpenSSLHeartbleed Also known as: openssl

Parses the <openSslHeartbleed> XML element.

Returns:

Since:

  • 1.0.0



19
20
21
22
23
# File 'lib/sslyze/xml/heartbleed.rb', line 19

def openssl_heartbleed
  @openssl_heartbleed ||= if (element = @node.at_xpath('openSslHeartbleed'))
                            OpenSSLHeartbleed.new(element)
                          end
end