Sha256: 7aafb25ab905ff6e3d1c0f880876533f12ae7729fb1ebd9e7d990381333e797e
Contents?: true
Size: 545 Bytes
Versions: 1
Compression:
Stored size: 545 Bytes
Contents
class Acme::Client::Certificate extend Forwardable attr_reader :x509, :x509_chain, :request, :private_key def_delegators :x509, :to_pem, :to_der def initialize(certificate, chain, request) @x509 = certificate @x509_chain = chain @request = request end def chain_to_pem x509_chain.map(&:to_pem).join end def x509_fullchain [x509, *x509_chain] end def fullchain_to_pem x509_fullchain.map(&:to_pem).join end def common_name x509.subject.to_a.find {|name, _, _| name == "CN" }[1] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acme-client-0.2.4 | lib/acme/client/certificate.rb |