47: def list(ca)
48: unless subjects
49: puts ca.waiting?.join("\n")
50: return nil
51: end
52:
53: signed = ca.list
54: requests = ca.waiting?
55:
56: if subjects == :all
57: hosts = [signed, requests].flatten
58: else
59: hosts = subjects
60: end
61:
62: hosts.uniq.sort.each do |host|
63: invalid = false
64: begin
65: ca.verify(host) unless requests.include?(host)
66: rescue Puppet::SSL::CertificateAuthority::CertificateVerificationError => details
67: invalid = details.to_s
68: end
69: if not invalid and signed.include?(host)
70: puts "+ " + host
71: elsif invalid
72: puts "- " + host + " (" + invalid + ")"
73: else
74: puts host
75: end
76: end
77: end