1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00

feature #3180: Raise an exception for not compatible client options

This commit is contained in:
Ruben S. Montero 2014-10-26 22:21:33 +01:00
parent 7520c11555
commit f970ed011d

View File

@ -158,7 +158,7 @@ module OpenNebula
http = @server.instance_variable_get("@http") http = @server.instance_variable_get("@http")
if options[:cert_dir] || ENV['ONE_CERT_DIR'] if options[:cert_dir] || ENV['ONE_CERT_DIR']
STDERR.puts "SSL options don't work in async mode" if @async raise "SSL options don't work in async mode" if @async
cert_dir = options[:cert_dir] || ENV['ONE_CERT_DIR'] cert_dir = options[:cert_dir] || ENV['ONE_CERT_DIR']
cert_files = Dir["#{cert_dir}/*"] cert_files = Dir["#{cert_dir}/*"]
@ -171,7 +171,7 @@ module OpenNebula
end end
if options[:disable_ssl_verify] || ENV['ONE_DISABLE_SSL_VERIFY'] if options[:disable_ssl_verify] || ENV['ONE_DISABLE_SSL_VERIFY']
STDERR.puts "SSL options don't work in async mode" if @async raise "SSL options don't work in async mode" if @async
http.verify_mode = OpenSSL::SSL::VERIFY_NONE http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end end