configure_ssl! is called after connecting
bughit opened this issue · 1 comments
bughit commented
Expected behavior
geocoder/lib/geocoder/lookups/base.rb
Lines 302 to 306 in 31153d5
Not sure if this post connected ssl config works for some ssl issues but it definitely does not work for bypassing "OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=error: certificate verify failed (certificate has expired))"
verify_mode needs to be set (which you would do in configure_ssl!) before connecting
Actual behavior
configure_ssl! is called after the connection attempt and failure
Steps to reproduce
Net::HTTP.start('expired.badssl.com', use_ssl: true){puts 'start block'}
fails before the start block
Environment info
- Geocoder version: master
bughit commented
What's needed here is the ability to specify additional opts to http_client.start
which will be applied to the client instance before connecting.