SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed MAC
- Download http://curl.haxx.se/ca/ca-bundle.crt
- Copy certificate into
/usr/local/etc/openssl/certs/
Make omniauth.rb look like this:
options = {
scope: "email",
:prompt => "select_account",
access_type: 'offline',
:client_options => {
:ssl => {
:ca_file => "/usr/local/etc/openssl/certs/ca-bundle.crt",
:ca_path => "/usr/local/etc/openssl/certs"
}
}
}
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, Rails.application.secrets.client_id, Rails.application.secrets.client_secret, options
end
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed on Mac
You need to update certificates:
sudo curl http://curl.haxx.se/ca/cacert.pem -o "$(ruby -ropenssl -e "p OpenSSL::X509::DEFAULT_CERT_FILE")"
Although this is considered to be not safe as the certificates are downloaded without https
and there is no way to tell if they were not changed on the way.
RVM has updated code that will use OSX certificates to update the file and will pull automatically dependencies, you can get it with:
rvm get head
rvm install 1.9.3
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
The issue has been solved by simply installing root certificates:
apt-get install openssl ca-certificates
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate, certificate verify failed
I was able to fix the problem by installing OpenSSL and pointing my SSL_CERT_PATH to the downloaded location.
Related Topics
How to Check If a Value Exists in an Array in Ruby
Getting Output of System() Calls in Ruby
Ruby: How to Post a File Via Http as Multipart/Form-Data
Trying to Learn/Understand Ruby Setter and Getter Methods
Is There an Efficient Way to Perform Hundreds of Text Substitutions in Ruby
How to Download a File from a Url and Save It in Rails
Nokogiri Installation Fails -Libxml2 Is Missing
Rails 3: Alias_Method_Chain Still Used
"Bin/Rails: No Such File or Directory" W/ Ruby 2 & Rails 4 on Heroku
Ruby 2.0 Rails Gem Install Error "Cannot Load Such File - Openssl"
To_D to Always Return 2 Decimals Places in Ruby
Difference Between Rake Db:Migrate Db:Reset and Db:Schema:Load
Difference Between Class Variables and Class Instance Variables
Confusion With the Assignment Operation Inside a Falsy 'If' Block
Using Sinatra For Larger Projects Via Multiple Files
Rails: What's a Good Way to Validate Links (Urls)
Difference Between '..' (Double-Dot) and '...' (Triple-Dot) in Range Generation