Ssl_Connect Returned=1 Errno=0 State=Sslv3 Read Server Certificate B: Certificate Verify Failed

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed MAC

  1. Download http://curl.haxx.se/ca/ca-bundle.crt
  2. Copy certificate into /usr/local/etc/openssl/certs/
  3. 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



Leave a reply



Submit