summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-11-18 20:22:45 +1100
committerJames Turnbull <james@lovedthanlost.net>2008-11-20 13:41:40 +1100
commitc65f2b50832c2772861298c469813c09d25fefd3 (patch)
tree83d776251546bf02a1a15982d9790625750c691a
parent1ad33cc1499bc9c5fee89d921c219b06986c34b5 (diff)
Fixed #1668 - puppetca can't clean unsigned certs
-rw-r--r--CHANGELOG2
-rwxr-xr-xbin/puppetca11
2 files changed, 8 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 4d50a6c86..4cf39b4ba 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,8 @@
whether stderr and stdout are combined in the output
Added versionable feature to the RPM provider
+
+ Fixed #1668 - puppetca can't clean unsigned certs
Moved RRD feature from util/metric.rb to feature/base.rb
diff --git a/bin/puppetca b/bin/puppetca
index 84c15992d..7c88aba8a 100755
--- a/bin/puppetca
+++ b/bin/puppetca
@@ -236,11 +236,12 @@ when :clean
cleaned = true
else
hosts.each do |host|
- cert = ca.getclientcert(host)[0]
- if cert.nil?
- $stderr.puts "Could not find client certificate for %s" % host
- next
- end
+
+ unless cert = ca.getclientcert(host)[0] || ca.getclientcsr(host)
+ $stderr.puts "Could not find client certificate or request for %s" % host
+ next
+ end
+
ca.clean(host)
cleaned = true
end