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