Sha256: adc7b16bc1d8466c24115b274ff5020010bc9fc974f967c7c7787a4d52a344b2

Contents?: true

Size: 784 Bytes

Versions: 49

Compression:

Stored size: 784 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 Setting[:ssl_ca_file]
      organization.regenerate_ueber_cert unless cert_store.verify ueber_cert
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
katello-3.12.3 app/services/cert/certs.rb
katello-3.12.2 app/services/cert/certs.rb
katello-3.12.1 app/services/cert/certs.rb
katello-3.11.2 app/services/cert/certs.rb
katello-3.10.2 app/services/cert/certs.rb
katello-3.12.0 app/services/cert/certs.rb
katello-3.12.0.rc2 app/services/cert/certs.rb
katello-3.10.1.1 app/services/cert/certs.rb
katello-3.12.0.rc1 app/services/cert/certs.rb
katello-3.10.1 app/services/cert/certs.rb
katello-3.11.1 app/services/cert/certs.rb
katello-3.11.0 app/services/cert/certs.rb
katello-3.11.0.rc2 app/services/cert/certs.rb
katello-3.11.0.rc1 app/services/cert/certs.rb
katello-3.10.0 app/services/cert/certs.rb
katello-3.10.0.rc1.1 app/services/cert/certs.rb
katello-3.9.1 app/services/cert/certs.rb
katello-3.10.0.rc1 app/services/cert/certs.rb
katello-3.9.0 app/services/cert/certs.rb
katello-3.8.1 app/services/cert/certs.rb