Project

General

Profile

Actions

Bug #3081

closed

Not setting ssl_ca, ssl_cert or ssl_key doesn't turn off the authentication in ENC

Added by Ivan Necas about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Foreman modules
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

This patch should be enough to understand the issue

 if SETTINGS[:ssl_ca] && !SETTINGS[:ssl_ca].empty?
       http.ca_file = SETTINGS[:ssl_ca]
       http.verify_mode = OpenSSL::SSL::VERIFY_PEER
     else
       http.verify_mode = OpenSSL::SSL::VERIFY_NONE
     end
-    if SETTINGS[:ssl_cert] and SETTINGS[:ssl_key]
+    if SETTINGS[:ssl_cert] && !SETTINGS[:ssl_cert].empty? && SETTINGS[:ssl_key] && !SETTINGS[:ssl_key].empty?
       http.cert = OpenSSL::X509::Certificate.new(File.read(SETTINGS[:ssl_cert]))
       http.key  = OpenSSL::PKey::RSA.new(File.read(SETTINGS[:ssl_key]), nil)
     end
Actions #2

Updated by Dominic Cleal about 11 years ago

  • Status changed from New to Closed
  • Target version set to 1.3.0
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF