class SSLyze::XML::Protocol::CipherSuite
Represents the `<cipherSuite>` XML
element.
Public Class Methods
new(node)
click to toggle source
Initializes the cipher suite.
@param [Nokogiri::XML::Node] node
The `<cipherSuite>` XML element.
# File lib/sslyze/xml/protocol/cipher_suite.rb, line 22 def initialize(node) @node = node end
Public Instance Methods
anonymous?()
click to toggle source
@return [Boolean]
# File lib/sslyze/xml/protocol/cipher_suite.rb, line 60 def anonymous? Boolean[@node['anonymous']] end
connection_status()
click to toggle source
The connection status when the cipher suite was used.
@return [String]
# File lib/sslyze/xml/protocol/cipher_suite.rb, line 53 def connection_status @connection_status ||= @node['connectionStatus'] end
key_exchange()
click to toggle source
Key exchange information.
@return [KeyExchange, nil]
# File lib/sslyze/xml/protocol/cipher_suite.rb, line 82 def key_exchange @key_exchange ||= if (element = @node.at_xpath('keyExchange')) KeyExchange.new(element) end end
key_size()
click to toggle source
The key size required by the cipher suite.
@return [Integer, nil]
@since 1.0.0
# File lib/sslyze/xml/protocol/cipher_suite.rb, line 71 def key_size @key_size ||= if (value = @node['keySize']) value.to_i end end
name()
click to toggle source
The cipher suite name.
@return [String]
# File lib/sslyze/xml/protocol/cipher_suite.rb, line 31 def name @name ||= @node['name'] end
openssl_name()
click to toggle source
Maps the RFC cipher name to it's OpenSSL name.
@return [String, nil]
@since 1.0.0
# File lib/sslyze/xml/protocol/cipher_suite.rb, line 44 def openssl_name CipherSuites::OPENSSL_NAMES[rfc_name] end