From 71042ad7126b4979e590e304b4c79fcd40f17d29 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Sun, 27 Oct 2024 19:48:43 +0100 Subject: [PATCH] Refs #30368 - Rename ca_cert_file to ssl_ca_file This is more consistent with other classes. --- app/lib/katello/http_resource.rb | 8 ++++---- app/lib/katello/resources/candlepin.rb | 2 +- app/lib/katello/resources/registry.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/lib/katello/http_resource.rb b/app/lib/katello/http_resource.rb index 82551f48be2..dcc9c11ec93 100644 --- a/app/lib/katello/http_resource.rb +++ b/app/lib/katello/http_resource.rb @@ -18,8 +18,8 @@ def initialize(params) include Katello::Concerns::FilterSensitiveData - class_attribute :consumer_secret, :consumer_key, :ca_cert_file, :prefix, :site, :default_headers, - :ssl_client_cert, :ssl_client_key + class_attribute :consumer_secret, :consumer_key, :prefix, :site, :default_headers, + :ssl_client_cert, :ssl_client_key, :ssl_ca_file attr_reader :json @@ -128,7 +128,7 @@ def rest_client(http_type, method, path) :authorize_path => "", :access_token_path => ""} - params[:ca_file] = self.ca_cert_file unless self.ca_cert_file.nil? + params[:ca_file] = self.ssl_ca_file unless self.ssl_ca_file.nil? # New OAuth consumer to setup signing the request consumer = OAuth::Consumer.new(self.consumer_key, self.consumer_secret, @@ -147,7 +147,7 @@ def rest_client(http_type, method, path) :open_timeout => SETTINGS[:katello][:rest_client_timeout], :timeout => SETTINGS[:katello][:rest_client_timeout] } - options[:ssl_ca_file] = self.ca_cert_file unless self.ca_cert_file.nil? + options[:ssl_ca_file] = self.ssl_ca_file unless self.ssl_ca_file.nil? options[:ssl_client_cert] = self.ssl_client_cert unless self.ssl_client_cert.nil? options[:ssl_client_key] = self.ssl_client_key unless self.ssl_client_key.nil? diff --git a/app/lib/katello/resources/candlepin.rb b/app/lib/katello/resources/candlepin.rb index beca732a2bf..ad70118f1c3 100644 --- a/app/lib/katello/resources/candlepin.rb +++ b/app/lib/katello/resources/candlepin.rb @@ -11,7 +11,7 @@ class CandlepinResource < HttpResource self.site = "#{uri.scheme}://#{uri.host}:#{uri.port}" self.consumer_secret = cfg[:oauth_secret] self.consumer_key = cfg[:oauth_key] - self.ca_cert_file = cfg[:ca_cert_file] + self.ssl_ca_file = cfg[:ca_cert_file] class << self def process_response(response) diff --git a/app/lib/katello/resources/registry.rb b/app/lib/katello/resources/registry.rb index 92cc0a3289f..d7c74acc548 100644 --- a/app/lib/katello/resources/registry.rb +++ b/app/lib/katello/resources/registry.rb @@ -54,7 +54,7 @@ def load_class uri = URI.parse(content_app_url) self.prefix = "/pulpcore_registry/" self.site = "#{uri.scheme}://#{uri.host}:#{uri.port}" - self.ca_cert_file = Setting[:ssl_ca_file] + self.ssl_ca_file = Setting[:ssl_ca_file] pulp_primary.pulp3_ssl_configuration(self, :net_http) self