Sha256: b8038cf7c53102f7688353121950123c27327d6d9601295d8cd60612f90f78df

Contents?: true

Size: 808 Bytes

Versions: 36

Compression:

Stored size: 808 Bytes

Contents

module Cert
  module Certs
    def self.ueber_cert(organization)
      organization.debug_cert
    end

    def self.ca_cert
      File.open(Setting[:ssl_ca_file], 'r').read
    end

    def self.ssl_client_cert
      @ssl_client_cert ||= OpenSSL::X509::Certificate.new(File.open(Setting['pulp_client_cert'], 'r').read)
    end

    def self.ssl_client_key
      @ssl_client_key ||= OpenSSL::PKey::RSA.new(File.open(Setting['pulp_client_key'], 'r').read)
    end

    def self.verify_ueber_cert(organization)
      ueber_cert = OpenSSL::X509::Certificate.new(self.ueber_cert(organization)[:cert])
      cert_store = OpenSSL::X509::Store.new
      cert_store.add_file SETTINGS[:katello][:candlepin][:ca_cert_file]
      organization.regenerate_ueber_cert unless cert_store.verify ueber_cert
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
katello-3.17.0.rc1 app/services/cert/certs.rb
katello-3.16.0 app/services/cert/certs.rb
katello-3.16.0.rc5.1 app/services/cert/certs.rb
katello-3.16.0.rc5 app/services/cert/certs.rb
katello-3.16.0.rc4.1 app/services/cert/certs.rb
katello-3.15.3.1 app/services/cert/certs.rb
katello-3.15.3 app/services/cert/certs.rb
katello-3.16.0.rc4 app/services/cert/certs.rb
katello-3.16.0.rc3.1 app/services/cert/certs.rb
katello-3.15.2 app/services/cert/certs.rb
katello-3.16.0.rc3 app/services/cert/certs.rb
katello-3.16.0.rc2.1 app/services/cert/certs.rb
katello-3.16.0.rc2 app/services/cert/certs.rb
katello-3.15.1.1 app/services/cert/certs.rb
katello-3.16.0.rc1.1 app/services/cert/certs.rb
katello-3.15.1 app/services/cert/certs.rb
katello-3.16.0.rc1 app/services/cert/certs.rb
katello-3.15.0.1 app/services/cert/certs.rb
katello-3.15.0 app/services/cert/certs.rb
katello-3.15.0.rc2 app/services/cert/certs.rb