SSL_connect returned = 1 errno = 0 state = SSLv3 read server certificate B: certificate verification failed on Mac

Using Homebrew on Mac OSX 10.7.5

  $ brew install openssl
 Error: openssl-1.0.1e already installed

 $ rake test.rake
 rake aborted!
 SSL_connect returned = 1 errno = 0 state = SSLv3 read server certificate B: certificate verify failed

I admit that there are other issues, such as the name, but none of the solutions seem to work. I tried them at different points, without success:

  rvm pkg install openssl
 rvm reinstall 1.9.3 --with-openssl-dir = $ rvm_path / usr
  rvm remove 1.9.3
 brew install openssl
 rvm install 1.9.3 --with-openssl-dir = `brew --prefix openssl`

I decided to check the openssl version and noticed this:

  $ openssl version
 OpenSSL 0.9.8r 8 Feb 2011

I hope this is indeed a problem, and the fix is ​​as simple as making sure my laptop detects the correct OpenSSL.

But how can I fix it, so instead I use OpenBlash for beginners?

Thanks in advance.

+4
source share
4 answers

You need to renew certificates:

sudo curl http://curl.haxx.se/ca/cacert.pem -o "$(ruby -ropenssl -e "p OpenSSL::X509::DEFAULT_CERT_FILE")" 

Although this is considered unsafe because certificates are downloaded without https , there is no way to find out if they have changed on the way.

RVM has updated code that will use OSX certificates to update the file and automatically pull dependencies, you can get it with:

 rvm get head rvm install 1.9.3 
+1
source

he worked for me using rvm

 $ rvm osx-ssl-certs status all $ rvm osx-ssl-certs update all 
+15
source

Based on mpapis answer, I executed these commands that fixed the problem for me.

 $ cd ~ $ rvm get head $ rvm requirements 

This gave me two key parts of the feedback:

 Upgrade of RVM in /Users/myuser/.rvm/ is complete. RVM Reloaded! 

and

 Installing requirements for osx, might require sudo password. Updating certificates in '/usr/local/etc/openssl/cert.pem'. 

After that, I no longer got the error.

+3
source

on my Mac running 10.8.3, I also had this problem, however I had a problem with the above solution, because when I tried to do this rvm get the head to install 1.9.3

or

 rvm requirements 

I got an Error while starting up 'requirements_osx_brew_libs_install ... which is a nightmare in my own right, see Error while executing' requirements_osx_brew_libs_install ... 'on Mac 10.7 for proof

Anyway I got it while working

 wget http://curl.haxx.se/ca/cacert.pem > mv cacert.pem /Users/USER/.rvm/usr/ssl/cert.pem 
0
source

All Articles