Class: SSLyze::XML::Protocol::CipherSuite
- Inherits:
-
Object
- Object
- SSLyze::XML::Protocol::CipherSuite
- Includes:
- Types
- Defined in:
- lib/sslyze/xml/protocol/cipher_suite.rb,
lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb
Overview
Represents the <cipherSuite>
XML element.
Defined Under Namespace
Classes: KeyExchange
Constant Summary
Constants included from Types
Instance Method Summary collapse
- #anonymous? ⇒ Boolean
-
#connection_status ⇒ String
The connection status when the cipher suite was used.
-
#initialize(node) ⇒ CipherSuite
constructor
Initializes the cipher suite.
-
#key_exchange ⇒ KeyExchange?
Key exchange information.
-
#key_size ⇒ Integer?
The key size required by the cipher suite.
-
#name ⇒ String
(also: #rfc_name, #to_s)
The cipher suite name.
-
#openssl_name ⇒ String?
Maps the RFC cipher name to it's OpenSSL name.
Constructor Details
#initialize(node) ⇒ CipherSuite
Initializes the cipher suite.
22 23 24 |
# File 'lib/sslyze/xml/protocol/cipher_suite.rb', line 22 def initialize(node) @node = node end |
Instance Method Details
#anonymous? ⇒ Boolean
60 61 62 |
# File 'lib/sslyze/xml/protocol/cipher_suite.rb', line 60 def anonymous? Boolean[@node['anonymous']] end |
#connection_status ⇒ String
The connection status when the cipher suite was used.
53 54 55 |
# File 'lib/sslyze/xml/protocol/cipher_suite.rb', line 53 def connection_status @connection_status ||= @node['connectionStatus'] end |
#key_exchange ⇒ KeyExchange?
Key exchange information.
82 83 84 85 86 |
# 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 ⇒ Integer?
The key size required by the cipher suite.
71 72 73 74 75 |
# 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 ⇒ String Also known as: rfc_name, to_s
The cipher suite name.
31 32 33 |
# File 'lib/sslyze/xml/protocol/cipher_suite.rb', line 31 def name @name ||= @node['name'] end |
#openssl_name ⇒ String?
Maps the RFC cipher name to it's OpenSSL name.
44 45 46 |
# File 'lib/sslyze/xml/protocol/cipher_suite.rb', line 44 def openssl_name CipherSuites::OPENSSL_NAMES[rfc_name] end |