Closed c2ofh closed 3 years ago
I'm unclear what you are asking here. Note that we do not recommend setting OpenSSL::SSL::VERIFY_NONE
.
For anyone else with the same question, here's a workaround to "chain" the SSL context:
options = if use_insecure_mode?
HTTP::Options.new(ssl: { verify_mode: OpenSSL::SSL::VERIFY_NONE })
else
HTTP::Options.new
end
http = HTTP::Client.new(options)
http.get("https://untrusted-root.badssl.com").to_s
We have a RestAPI wrapper for all Apis with http.rb included.
The HTTP request is composed depending on what the API needs or requires.
Now there is one API where we need to disable the SSL Verify. Can this be included in the generic HTTP object?
I would like to add this as option within the
http
-method or is it needed to append it to theget
like this?