jamesgolick / always_verify_ssl_certificates

Ruby's net/http is setup to never verify SSL certificates by default. Most ruby libraries do the same. That means that you're not verifying the identity of the server you're communicating with and are therefore exposed to man in the middle attacks. This gem monkey-patches net/http to force certificate verification and make turning it off impossible.
MIT License
97 stars 16 forks source link

Wrong argument (NilClass) #5

Open cmer opened 13 years ago

cmer commented 13 years ago

/Users/carl/.rvm/gems/ruby-1.9.2-p136/gems/always_verify_ssl_certificates-0.3.0/lib/always_verify_ssl_certificates.rb:17:in initialize': wrong argument (NilClass)! (Expected kind of OpenSSL::SSL::SSLContext) (TypeError) from /Users/carl/.rvm/gems/ruby-1.9.2-p136/gems/always_verify_ssl_certificates-0.3.0/lib/always_verify_ssl_certificates.rb:17:innew' from /Users/carl/.rvm/gems/ruby-1.9.2-p136/gems/always_verify_ssl_certificates-0.3.0/lib/always_verify_ssl_certificates.rb:17:in connect' from /Users/carl/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:637:indo_start' from /Users/carl/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:626:in start' from /Users/carl/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/net/http.rb:1160:inrequest' from /Users/carl/.rvm/gems/ruby-1.9.2-p136/gems/httparty-0.7.4/lib/httparty/request.rb:69:in perform' from /Users/carl/.rvm/gems/ruby-1.9.2-p136/gems/httparty-0.7.4/lib/httparty.rb:394:inperform_request' from /Users/carl/.rvm/gems/ruby-1.9.2-p136/gems/httparty-0.7.4/lib/httparty.rb:346:in get' from /Volumes/1TB Storage/Carl/Dropbox/code/opensource/contextio/lib/contextio/request.rb:79:inget' from /Volumes/1TB Storage/Carl/Dropbox/code/opensource/contextio/lib/contextio/request.rb:22:in all_files' from test/unit/test.rb:9:in

'

loe commented 13 years ago

1.9 compat. This isn't really necessary as VERIFY_PEER is the default. It is possible that another library disables this for you.