Skip to content

Commit 04595e8

Browse files
committed
fix(get_peadm_config): use Puppet certname instead of localhost for HTTPS connection
Changed the HTTPS connection to use Puppet's certname instead of 'localhost' to ensure proper SSL certificate validation.
1 parent e3ae941 commit 04595e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/get_peadm_config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def server(role, letter, certname_array)
101101
end
102102

103103
def https(port)
104-
https = Net::HTTP.new('localhost', port)
104+
https = Net::HTTP.new(Puppet.settings[:certname], port)
105105
https.use_ssl = true
106106
https.cert = @cert ||= OpenSSL::X509::Certificate.new(File.read(Puppet.settings[:hostcert]))
107107
https.key = @key ||= OpenSSL::PKey::RSA.new(File.read(Puppet.settings[:hostprivkey]))

0 commit comments

Comments
 (0)