summaryrefslogtreecommitdiffstats
path: root/lib/puppet/ssl/certificate.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/ssl/certificate.rb')
-rw-r--r--lib/puppet/ssl/certificate.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/puppet/ssl/certificate.rb b/lib/puppet/ssl/certificate.rb
new file mode 100644
index 000000000..16af85d06
--- /dev/null
+++ b/lib/puppet/ssl/certificate.rb
@@ -0,0 +1,19 @@
+require 'puppet/ssl/base'
+
+# Manage certificates themselves. This class has no
+# 'generate' method because the CA is responsible
+# for turning CSRs into certificates; we can only
+# retrieve them from the CA (or not, as is often
+# the case).
+class Puppet::SSL::Certificate < Puppet::SSL::Base
+ # This is defined from the base class
+ wraps OpenSSL::X509::Certificate
+
+ extend Puppet::Indirector
+ indirects :certificate, :terminus_class => :file
+
+ def expiration
+ return nil unless content
+ return content.not_after
+ end
+end