Lines Matching refs:chain
50 # Verifies each certificate in +chain+ has signed the following certificate
53 def check_chain chain, time
54 raise Gem::Security::Exception, 'missing signing chain' unless chain
55 raise Gem::Security::Exception, 'empty signing chain' if chain.empty?
58 chain.each_cons 2 do |issuer, cert|
64 raise Gem::Security::Exception, "invalid signing chain: #{e.message}"
124 # Ensures the root certificate in +chain+ is self-signed and valid for
127 def check_root chain, time
128 raise Gem::Security::Exception, 'missing signing chain' unless chain
130 root = chain.first
143 # Ensures the root of +chain+ has a trusted certificate in +trust_dir+ and
146 def check_trust chain, digester, trust_dir
147 raise Gem::Security::Exception, 'missing signing chain' unless chain
149 root = chain.first
158 message << " (root of signing cert #{chain.last.subject})" if
159 chain.length > 1
179 ("[Policy: %s - data: %p signer: %p chain: %p root: %p " +
187 # Verifies the certificate +chain+ is valid, the +digests+ match the
193 def verify chain, key = nil, digests = {}, signatures = {}
215 signer = chain.last
221 check_chain chain, time if @verify_chain
223 check_root chain, time if @verify_root
225 check_trust chain, digester, trust_dir if @only_trusted
247 # Extracts the certificate chain from the +spec+ and calls #verify to ensure
248 # the signatures and certificate chain is valid according to the policy..
251 chain = spec.cert_chain.map do |cert_pem|
255 verify chain, nil, digests, signatures