Class: Puppet::SSL::StateMachine::SSLState

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/ssl/state_machine.rb

Direct Known Subclasses

Done, Error, KeySSLState, NeedCACerts, NeedCRLs, NeedKey, Wait

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(machine, ssl_context) ⇒ SSLState


18
19
20
21
22
23
# File 'lib/puppet/ssl/state_machine.rb', line 18

def initialize(machine, ssl_context)
  @machine = machine
  @ssl_context = ssl_context
  @cert_provider = machine.cert_provider
  @ssl_provider = machine.ssl_provider
end

Instance Attribute Details

#ssl_contextObject (readonly)

Returns the value of attribute ssl_context


16
17
18
# File 'lib/puppet/ssl/state_machine.rb', line 16

def ssl_context
  @ssl_context
end

Instance Method Details

#to_error(message, cause) ⇒ Object


25
26
27
28
29
# File 'lib/puppet/ssl/state_machine.rb', line 25

def to_error(message, cause)
  detail = Puppet::Error.new(message)
  detail.set_backtrace(cause.backtrace)
  Error.new(@machine, message, detail)
end