Sha256: 6fac6f09de380993ebfc73e615ead04ac60be5026769263a7639b38890691490
Contents?: true
Size: 969 Bytes
Versions: 3
Compression:
Stored size: 969 Bytes
Contents
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 # Convert a string into an instance. def self.from_s(string) instance = wrapped_class.new(string) name = instance.subject.to_s.sub(/\/CN=/i, '').downcase result = new(name) result.content = instance result end # Because of how the format handler class is included, this # can't be in the base class. def self.supported_formats [:s] end def expiration return nil unless content return content.not_after end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.25.5 | lib/puppet/ssl/certificate.rb |
puppet-0.25.1 | lib/puppet/ssl/certificate.rb |
puppet-0.25.0 | lib/puppet/ssl/certificate.rb |