Class: SSLyze::XML::Protocol::CipherSuite::KeyExchange
- Inherits:
-
Object
- Object
- SSLyze::XML::Protocol::CipherSuite::KeyExchange
- Defined in:
- lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb
Overview
Key exchange information.
Instance Method Summary collapse
- #a ⇒ String?
- #b ⇒ String?
- #cofactor ⇒ Integer?
-
#dh? ⇒ Boolean
Determines if DH key exchange was used.
-
#ecdhe? ⇒ Boolean
Determines if ECDHE key exchange was used.
- #field_type ⇒ String?
- #generator ⇒ String
- #generator_type ⇒ Symbol?
- #group_size ⇒ Integer
-
#initialize(node) ⇒ KeyExchange
constructor
Initializes the key exchange information.
- #order ⇒ String?
- #prime ⇒ String?
- #seed ⇒ String?
- #type ⇒ Symbol
Constructor Details
#initialize(node) ⇒ KeyExchange
Initializes the key exchange information.
18 19 20 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 18 def initialize(node) @node = node end |
Instance Method Details
#a ⇒ String?
25 26 27 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 25 def a @a ||= @node['A'] end |
#b ⇒ String?
32 33 34 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 32 def b @b ||= @node['B'] end |
#cofactor ⇒ Integer?
39 40 41 42 43 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 39 def cofactor @cofactor ||= if (value = @node['Cofactor']) value.to_i end end |
#dh? ⇒ Boolean
Determines if DH key exchange was used.
110 111 112 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 110 def dh? type == :DH end |
#ecdhe? ⇒ Boolean
Determines if ECDHE key exchange was used.
119 120 121 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 119 def ecdhe? type == :ECDHE end |
#field_type ⇒ String?
48 49 50 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 48 def field_type @field_type ||= @node['Field_Type'] end |
#generator ⇒ String
55 56 57 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 55 def generator @generator ||= @node['Generator'] end |
#generator_type ⇒ Symbol?
62 63 64 65 66 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 62 def generator_type @generator_type ||= if (value = @node['GeneratorType']) value.to_sym end end |
#group_size ⇒ Integer
71 72 73 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 71 def group_size @group_size ||= @node['GroupSize'].to_i end |
#order ⇒ String?
80 81 82 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 80 def order @order ||= @node['Order'] end |
#prime ⇒ String?
87 88 89 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 87 def prime @prime ||= @node['Prime'] end |
#seed ⇒ String?
94 95 96 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 94 def seed @seed ||= @node['Seed'] end |
#type ⇒ Symbol
101 102 103 |
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 101 def type @type ||= @node['Type'].to_sym end |