The Quick AND Easy way to resolve OpenSSL Certificate issues on Mac OSX

Richardson Dackam
3 min readMay 5, 2016

I had experienced way too many headache with this bad boy and I finally found the perfect *simple* solution! :) If you want to thanks me later just recommend or tweet this article and share it with other developers that might benefit from this quick fix. You could also comment on stack overflow issues with this fix.

This page has a simple solution for the following pains:

  • OpenSSL Verify return code: 20 (unable to get local issuer certificate)
  • certificate verify failed (OpenSSL::SSL::SSLError)
  • openssl::ssl::sslerror: ssl_connect returned=1 errno=0 state=sslv3 read server certificate b: certificate verify failed
  • and other SSL certification failure pain…

No need for the manual way, but if you still want to do it using the terminal, well…. I can’t stop you. Here a good one: https://gist.github.com/colinstein/8e1a0b12465561d71e91

The Solution

The biggest surprise is that you’re not going to use your terminal:

Haha yes I have an African Warrior on my background.

Yes — No need for your terminal to fix this one on Mac OS. Because you have an amazing tool at your disposition on your Mac:

Keychain is password management system in OS X developed by Apple. It was introduced with Mac OS 8.6, and has been included in all subsequent versions of Mac OS, including OS X. — Wikipedia

I’m going to show you how I now fix my OpenSSL issues. This is going to take less than 5min and you’re going to be so happy you discovered this Today.

Step 1

Step 2

Step 3

Step 4 ( optional )

This one is optional because it should be set up by default.

That’s it!

Now your openSSL certificate that was expired or not signed is back to business. You can go back to coding and stop wasting your time trying to fix this :)

Extra Tip For JRuby users: If you run Bundle Install and you’re getting: OpenSSL::X509::StoreError: setting default path failed: Invalid keystore format

Follow these instructions: https://gist.github.com/kendagriff/adec3713b4dfe6a1abdf

Extra Tip: Do you ever get into a situation where you’re connected to the WiFi with your laptop and would like to connect your phone to the WiFi but you can’t remember the password?

Well, you can find out that WiFi password in Keychain Access as well!

  1. Click on Passwords
  2. Search for the Wifi network name
  3. Click on it
  4. Click on “Show Password”

_
Richardson is the Managing Partner & CTO at
Rich DX Studio, a product development consulting agency located in Toronto.

--

--

Richardson Dackam

Self-taught Developer, Technology Writer, Startups Founder, Crypto Enthousiast, Youtuber, Twitch Partner, and Podcast Host