Sha256: 237fe1f124a928bb1068f6560ec6dec885a2e59b9f2072178fd50bec299a7f48

Contents?: true

Size: 688 Bytes

Versions: 20

Compression:

Stored size: 688 Bytes

Contents

# frozen_string_literal: true
require_relative '../../puppet/ssl'

module Puppet::SSL
  SSLContext = Struct.new(
    :store,
    :cacerts,
    :crls,
    :private_key,
    :client_cert,
    :client_chain,
    :revocation,
    :verify_peer
  ) do
    DEFAULTS = {
      cacerts: [],
      crls: [],
      client_chain: [],
      revocation: true,
      verify_peer: true
    }.freeze

    # 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.
    def initialize(kwargs = {})
      super({})
      DEFAULTS.merge(**kwargs).each { |k,v| self[k] = v }
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/ssl/ssl_context.rb
puppet-8.3.0-x86-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.3.0-x64-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.3.0-universal-darwin lib/puppet/ssl/ssl_context.rb
puppet-8.3.1 lib/puppet/ssl/ssl_context.rb
puppet-8.3.1-x86-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.3.1-x64-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.3.1-universal-darwin lib/puppet/ssl/ssl_context.rb
puppet-8.2.0 lib/puppet/ssl/ssl_context.rb
puppet-8.2.0-x86-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.2.0-x64-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.2.0-universal-darwin lib/puppet/ssl/ssl_context.rb
puppet-8.1.0 lib/puppet/ssl/ssl_context.rb
puppet-8.1.0-x86-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.1.0-x64-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.1.0-universal-darwin lib/puppet/ssl/ssl_context.rb
puppet-8.0.1 lib/puppet/ssl/ssl_context.rb
puppet-8.0.1-x86-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.0.1-x64-mingw32 lib/puppet/ssl/ssl_context.rb
puppet-8.0.1-universal-darwin lib/puppet/ssl/ssl_context.rb