Skip to content

Commit c31730d

Browse files
committed
(PUP-11428) Print CRL information
Print information about each CRL in the SSLContext including the issuer for the CRL. The `crlNumber` is incremented each time a new version is published and the `authorityKeyIdentifier` identifies the public key corresponding to the private key that was used to sign the CRL.
1 parent d8770ea commit c31730d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/puppet/ssl/ssl_provider.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ def print(ssl_context, alg = 'SHA256')
185185
Puppet.debug(_("Verified CA certificate '%{subject}' fingerprint %{digest}") % {subject: cert.subject.to_utf8, digest: digest})
186186
end
187187
end
188+
ssl_context.crls.each do |crl|
189+
oid_values = Hash[crl.extensions.map { |ext| [ext.oid, ext.value] }]
190+
crlNumber = oid_values['crlNumber'] || 'unknown'
191+
authKeyId = (oid_values['authorityKeyIdentifier'] || 'unknown').chomp!
192+
Puppet.debug("Using CRL '#{crl.issuer.to_utf8}' authorityKeyIdentifier '#{authKeyId}' crlNumber '#{crlNumber }'")
193+
end
188194
end
189195
end
190196

0 commit comments

Comments
 (0)