class Puppet::SSL::Validator

API for certificate verification

@api public

Public Instance Methods

peer_certs() click to toggle source

Array of peer certificates @return [Array<Puppet::SSL::Certificate>] peer certificates

@api public

# File lib/puppet/ssl/validator.rb, line 35
def peer_certs
  raise NotImplementedError, "Concrete class should have implemented this method"
end
setup_connection(connection) click to toggle source

Registers the connection to validate.

@param [Net::HTTP] connection The connection to validate

@return [void]

@api public

# File lib/puppet/ssl/validator.rb, line 56
def setup_connection(connection)
  raise NotImplementedError, "Concrete class should have implemented this method"
end
verify_errors() click to toggle source

Contains the result of validation @return [Array<String>, nil] nil, empty Array, or Array with messages

@api public

# File lib/puppet/ssl/validator.rb, line 44
def verify_errors
  raise NotImplementedError, "Concrete class should have implemented this method"
end

Public Class Methods

default_validator() click to toggle source

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

# File lib/puppet/ssl/validator.rb, line 26
def self.default_validator()
  Puppet::SSL::Validator::DefaultValidator.new()
end
no_validator() click to toggle source

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

# File lib/puppet/ssl/validator.rb, line 15
def self.no_validator()
  @@no_validator_cache ||= Puppet::SSL::Validator::NoValidator.new()
end