Skip to content

Commit a60cc10

Browse files
committed
fix(rbac_token): correct syntax errors in SSL configuration
- Fixed incorrect syntax in Net::HTTP initialization. - Corrected method calls for SSL setup and certificate handling. - Ensured proper request initialization for RBAC token generation.
1 parent 7cac8d4 commit a60cc10

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tasks/rbac_token.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
'label' => 'provision-time token',
2323
}.to_json
2424

25-
https. = Net::HTTP.new(Puppet.settings[:certname], 4433)
26-
https..use_ssl = true
27-
https..cert = OpenSSL::X509::Certificate.new(File.read(Puppet.settings[:hostcert]))
28-
https..key = OpenSSL::PKey::RSA.new(File.read(Puppet.settings[:hostprivkey]))
29-
https..verify_mode = OpenSSL::SSL::VERIFY_PEER
30-
https..ca_file = Puppet.settings[:localcacert]
31-
request = Net::https.:Post.new('/rbac-api/v1/auth/token')
25+
https = Net::HTTP.new(Puppet.settings[:certname], 4433)
26+
https.use_ssl = true
27+
https.cert = OpenSSL::X509::Certificate.new(File.read(Puppet.settings[:hostcert]))
28+
https.key = OpenSSL::PKey::RSA.new(File.read(Puppet.settings[:hostprivkey]))
29+
https.verify_mode = OpenSSL::SSL::VERIFY_PEER
30+
https.ca_file = Puppet.settings[:localcacert]
31+
request = Net::https:Post.new('/rbac-api/v1/auth/token')
3232
request['Content-Type'] = 'application/json'
3333
request.body = body
3434

0 commit comments

Comments
 (0)