wrest
wrest copied to clipboard
Fix connection.verify_mode for Net::HTTP https connection to VERIFY_PEER
Also, make it configurable. See http://www.rubyinside.com/how-to-cure-nethttps-risky-default-https-behavior-4010.html
I have defaulted the verify_mode to VERIFY_PEER while creating a connection and made it configurable by being able to pass an options hash to the create method specifying the verify_mode
Remember to update the changelog once this is complete.
-
All HTTPS requests are VERIFY_PEER. The option to choose VERIFY_NONE is not exposed to the Uri object.
-
VERIFY_MODE value is being expected as a string: if options[:verify_mode] == 'VERIFY_NONE'
It should ideally be the symbol OpenSSL::SSL::VERIFY_PEER itself.
Fixed and pushed a week back. Hasn't been updated here for unknown reason. Redid push. Still not updated!
What's happening on this one? Nik, could you link to the commits that you're talking about? Also, did you see my comments on the use of constants on 92a6acf1b96166cf298650feec49b6a4c963654a ?
done! https://github.com/kaiwren/wrest/commit/c74c02062c5a09c33f7bb84c6fd80ef2080c2ee9
Nik, could you also take a look at #66? It seems to be a consequence of switching to always verifying certificates.