Sha256: a5e1463b8bce97ede5c77c7a4df91df710082412b011ed1a66cbe8a0c2bac650

Contents?: true

Size: 1.56 KB

Versions: 453

Compression:

Stored size: 1.56 KB

Contents

require 'openssl'

# API for certificate verification
#
# @api public
class Puppet::SSL::Validator

  # Factory method for creating an instance of a null/no validator.
  # This method does not have to be implemented by concrete implementations of this API.
  #
  # @return [Puppet::SSL::Validator] produces a validator that performs no validation
  #
  # @api public
  #
  def self.no_validator()
    @@no_validator_cache ||= Puppet::SSL::Validator::NoValidator.new()
  end

  # Factory method for creating an instance of the default Puppet validator.
  # This method does not have to be implemented by concrete implementations of this API.
  #
  # @return [Puppet::SSL::Validator] produces a validator that performs no validation
  #
  # @api public
  #
  def self.default_validator()
    Puppet::SSL::Validator::DefaultValidator.new()
  end

  # Array of peer certificates
  # @return [Array<Puppet::SSL::Certificate>] peer certificates
  #
  # @api public
  #
  def peer_certs
    raise NotImplementedError, "Concrete class should have implemented this method"
  end

  # Contains the result of validation
  # @return [Array<String>, nil] nil, empty Array, or Array with messages
  #
  # @api public
  #
  def verify_errors
    raise NotImplementedError, "Concrete class should have implemented this method"
  end

  # Registers the connection to validate.
  #
  # @param [Net::HTTP] connection The connection to validate
  #
  # @return [void]
  #
  # @api public
  #
  def setup_connection(connection)
    raise NotImplementedError, "Concrete class should have implemented this method"
  end
end

Version data entries

453 entries across 453 versions & 3 rubygems

Version Path
puppet-5.5.22 lib/puppet/ssl/validator.rb
puppet-5.5.22-x86-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.22-x64-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.22-universal-darwin lib/puppet/ssl/validator.rb
puppet-5.5.21 lib/puppet/ssl/validator.rb
puppet-5.5.21-x86-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.21-x64-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.21-universal-darwin lib/puppet/ssl/validator.rb
puppet-5.5.20 lib/puppet/ssl/validator.rb
puppet-5.5.20-x86-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.20-x64-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.20-universal-darwin lib/puppet/ssl/validator.rb
puppet-5.5.19 lib/puppet/ssl/validator.rb
puppet-5.5.19-x86-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.19-x64-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.19-universal-darwin lib/puppet/ssl/validator.rb
puppet-5.5.18 lib/puppet/ssl/validator.rb
puppet-5.5.18-x86-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.18-x64-mingw32 lib/puppet/ssl/validator.rb
puppet-5.5.18-universal-darwin lib/puppet/ssl/validator.rb