Install openssl on OS X

I got "certificate verify failed (OpenSSL::SSL::SSLError)" in my ruby ​​application and decided it was time to upgrade the old opensl on my Mac OS X (Mountain Lion) system.

I grabbed the latest sources from here and made the usual

  • ./ Setting darwin64-x86_64-cc
  • to do
  • make a test
  • sudo make install

... and everything is completed without a visible error. But I noticed that the new openssl did not replace the old openssl:

 $ which openssl /usr/bin/openssl $ /usr/bin/openssl version OpenSSL 0.9.8x 10 May 2012 $ /usr/local/ssl/bin/openssl version OpenSSL 1.0.1e 11 Feb 2013 

I hesitate to mess with important system files for fear of breaking existing things. What is the recommended approach? I am thinking of replacing / usr / bin / openssl with a symlink to the version of / usr / local / ssl / bin. Will this work?

+8
openssl osx-mountain-lion macos
source share
1 answer

To assign a local copy on top of the system copy, you need to add it to the shell PATH variable

 export PATH="/usr/local/ssl/bin:$PATH" 

If you want this to be executed every time you run the shell, just add it to your .bash_profile in your home directory.

However, this will not solve your problem, because Ruby will need to be recompiled against the new OpenSSL (we will assume that the updated root certificate file that comes with the new OpenSSL will hypothetically fix this problem). I would recommend installing rvm or rbenv and restoring ruby. Note that both of these tools prefer you to install openssl via homebrew .

+9
source share

All Articles