Class: SSLyze::XML::Protocol::CipherSuite::KeyExchange

Inherits:
Object
  • Object
show all
Defined in:
lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb

Overview

Key exchange information.

Instance Method Summary collapse

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

#aString?



25
26
27
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 25

def a
  @a ||= @node['A']
end

#bString?



32
33
34
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 32

def b
  @b ||= @node['B']
end

#cofactorInteger?



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_typeString?



48
49
50
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 48

def field_type
  @field_type ||= @node['Field_Type']
end

#generatorString



55
56
57
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 55

def generator
  @generator ||= @node['Generator']
end

#generator_typeSymbol?



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_sizeInteger



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

#orderString?

Since:

  • 1.0.0



80
81
82
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 80

def order
  @order ||= @node['Order']
end

#primeString?



87
88
89
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 87

def prime
  @prime ||= @node['Prime']
end

#seedString?



94
95
96
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 94

def seed
  @seed ||= @node['Seed']
end

#typeSymbol



101
102
103
# File 'lib/sslyze/xml/protocol/cipher_suite/key_exchange.rb', line 101

def type
  @type ||= @node['Type'].to_sym
end