Skip to content

Instantly share code, notes, and snippets.

View nd2go's full-sized avatar
💭
I may be slow to respond.

d nd2go

💭
I may be slow to respond.
View GitHub Profile
@nd2go
nd2go / gist:5e923f27bebd1946d006b5a407b553b0
Created February 22, 2018 04:32 — forked from tam7t/gist:86eb4793e8ecf3f55037
Securing Ruby's OpenSSL

Are your Ruby HTTPS API calls secure?

Let's check:

2.0.0-p481 :001 > OpenSSL::SSL::SSLContext::DEFAULT_PARAMS
 => {:ssl_version=>"SSLv23", :verify_mode=>1, :ciphers=>"ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW", :options=>-2147482625}
2.0.0-p481 :002 > rating = JSON.parse(RestClient::Resource.new("https://www.howsmyssl.com/a/check" ).get)['rating']
 => "Bad"