Class: Puppet::SSL::SSLContext

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

Constant Summary collapse

DEFAULTS =
{
  cacerts: [],
  crls: [],
  client_chain: [],
  revocation: true,
  verify_peer: true
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ SSLContext

This is an idiom to initialize a Struct from keyword arguments. Ruby 2.5 introduced `keyword_init: true` for that purpose, but we need to support older versions.


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

def initialize(**kwargs)
  super({})
  DEFAULTS.merge(kwargs).each { |k,v| self[k] = v }
end

Instance Attribute Details

#cacertsObject

Returns the value of attribute cacerts

Returns:

  • (Object)

    the current value of cacerts


4
5
6
# File 'lib/puppet/ssl/ssl_context.rb', line 4

def cacerts
  @cacerts
end

#client_certObject

Returns the value of attribute client_cert

Returns:

  • (Object)

    the current value of client_cert


4
5
6
# File 'lib/puppet/ssl/ssl_context.rb', line 4

def client_cert
  @client_cert
end

#client_chainObject

Returns the value of attribute client_chain

Returns:

  • (Object)

    the current value of client_chain


4
5
6
# File 'lib/puppet/ssl/ssl_context.rb', line 4

def client_chain
  @client_chain
end

#crlsObject

Returns the value of attribute crls

Returns:

  • (Object)

    the current value of crls


4
5
6
# File 'lib/puppet/ssl/ssl_context.rb', line 4

def crls
  @crls
end

#private_keyObject

Returns the value of attribute private_key

Returns:

  • (Object)

    the current value of private_key


4
5
6
# File 'lib/puppet/ssl/ssl_context.rb', line 4

def private_key
  @private_key
end

#revocationObject

Returns the value of attribute revocation

Returns:

  • (Object)

    the current value of revocation


4
5
6
# File 'lib/puppet/ssl/ssl_context.rb', line 4

def revocation
  @revocation
end

#storeObject

Returns the value of attribute store

Returns:

  • (Object)

    the current value of store


4
5
6
# File 'lib/puppet/ssl/ssl_context.rb', line 4

def store
  @store
end

#verify_peerObject

Returns the value of attribute verify_peer

Returns:

  • (Object)

    the current value of verify_peer


4
5
6
# File 'lib/puppet/ssl/ssl_context.rb', line 4

def verify_peer
  @verify_peer
end