Skip to content
Snippets Groups Projects
Commit 3ccd77f4 authored by jlhonora's avatar jlhonora
Browse files

Only add NO_COMPRESSION flag if defined

parent e98af884
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,11 @@ module Geocoder::Lookup
def configure_ssl!(client)
client.instance_eval {
@ssl_context = OpenSSL::SSL::SSLContext.new
@ssl_context.set_params({:options=> OpenSSL::SSL::OP_NO_SSLv2 | OpenSSL::SSL::OP_NO_SSLv3 | OpenSSL::SSL::OP_NO_COMPRESSION})
options = OpenSSL::SSL::OP_NO_SSLv2 | OpenSSL::SSL::OP_NO_SSLv3
if OpenSSL::SSL.const_defined?('OP_NO_COMPRESSION')
options |= OpenSSL::SSL::OP_NO_COMPRESSION
end
@ssl_context.set_params({options: options})
}
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment