Something I've recently done has caused an app that was working ok to raise the following error type on whichever page I visit locally:
OpenSSL::SSL::SSLError in WhateverController#whateveraction
SSL_connect returned=1 errno=0 state=error: certificate verify failed
I've been looking at various threads referring to similar problems, and the most plausible solution I've found is on this guide. Specifically, in their 'Diagnosis' section, when I run $ openssl version
, I get OpenSSL 0.9.8zg 14 July 2015
. On that guide, it says 'You should see OpenSSL 1.0.1 or newer. If not, try updating OpenSSL.'
But when I then try brew upgrade openssl
it outputs
'Error: openssl 1.0.2j already installed'.
I've run the command
ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl openssl
,
which I found in rorykoehler's response to this post. It didn't raise an error, but it doesn't seem to have done anything useful - it didn't output anything, and running
brew install openssl --force
outputs 'Warning: openssl-1.0.2j already installed, it's just not linked.'
I've also tried adding
exportPATH="$PATH:/usr/local/Cellar/openssl/1.0.2j/bin/openssl"
to my .bash_profile file, and re-sourcing the iIterm window. Still I'm getting 'OpenSSL 0.9.8zg 14 July 2015'.
So I'm not sure what to do at this stage. How do I get the mac to actually use the latest version of openssl?
If relevant (I've seen references to them in some of the other threads I've been reading), I'm using a Macbook Pro running Yosemite 10.10.5, Homebrew 1.1.3 and RVM (1.27.0).
I'm also wondering if something about my $PATH variable is causing problems, since that gets edited in my .bash_profile. The output of echo $PATH
looks like this:
:/usr/local/bin:/Users/sashac/.rvm/gems/ruby-2.3.0/bin:/Users/sashac/.rvm/gems/ruby-2.3.0@global/bin:/Users/sashac/.rvm/rubies/ruby-2.3.0/bin:/Users/sashac/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Cellar/openssl/1.0.2j/bin/openssl:/usr/local/heroku/bin:/Users/sashac/.rvm/bin:~/bin:/Users/sashac/.rvm/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin
ETA in response to Sorontar: which openssl
outputs '/usr/bin/openssl'. I've tried deleting it, but it's still not finding another version - now openssl commands return -bash: openssl: command not found