lib/puppet/ssl/certificate_authority.rb
# Verify a given host's certificate.
Verify a given host's certificate.
Verify a given host ' s certificate .
def verify(name)
    unless cert = Puppet::SSL::Certificate.indirection.find(name)
      raise ArgumentError, "Could not find a certificate for #{name}"
    end
    store = OpenSSL::X509::Store.new
    store.add_file Puppet[:cacert]
    store.add_crl crl.content if self.crl
    store.purpose = OpenSSL::X509::PURPOSE_SSL_CLIENT
    store.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL|OpenSSL::X509::V_FLAG_CRL_CHECK if Puppet.settings[:certificate_revocation]
    raise CertificateVerificationError.new(store.error), store.error_string unless store.verify(cert.content)
  end
def verify ( name ) unless cert = Puppet :: SSL :: Certificate . indirection . find ( name ) raise ArgumentError , "Could not find a certificate for #{name}" end store = OpenSSL :: X509 :: Store . new store . add_file Puppet [ :cacert ] store . add_crl crl . content if self . crl store . purpose = OpenSSL :: X509 :: PURPOSE_SSL_CLIENT store . flags = OpenSSL :: X509 :: V_FLAG_CRL_CHECK_ALL | OpenSSL :: X509 :: V_FLAG_CRL_CHECK if Puppet . settings [ :certificate_revocation ] raise CertificateVerificationError . new ( store . error ) , store . error_string unless store . verify ( cert . content ) end
Verify a given host's certificate.
Verify a given host ' s certificate .
name
<not_specific>