0

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

Armali
  • 18,255
  • 14
  • 57
  • 171
Arepo
  • 825
  • 1
  • 9
  • 23
  • 1
    Find the file being used as openssl:`which openssl`, then either remove it or find the package that installed it and remove such package. Care to post the output of `which openssl` for further help?. –  Dec 13 '16 at 18:06
  • Well, there was an old openssl that was running when you called it. Now that you erased it, maybe you need a new soft-link. Do: `ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/bin/openssl` to get it linked. –  Dec 13 '16 at 23:41
  • 1
    Next-time: write a note about your update with @ . I found that you have updated the question by plain luck, I didn't receive any notification. –  Dec 13 '16 at 23:44
  • Also see [Brew refusing to link openssl](http://stackoverflow.com/q/38670295), [Update OpenSSL on OS X with Homebrew](http://stackoverflow.com/q/15185661), [How to install latest version of openssl Mac OS X El Capitan](http://stackoverflow.com/q/35129977), [How to upgrade OpenSSL in OS X?](http://apple.stackexchange.com/q/126830), [Openssl installation using HomeBrew fails](http://superuser.com/q/486389), etc. – jww Dec 14 '16 at 04:39

0 Answers0