Skip to content

Instantly share code, notes, and snippets.

@jegger
Created October 22, 2015 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jegger/35bc1520a295b8054ba8 to your computer and use it in GitHub Desktop.
Save jegger/35bc1520a295b8054ba8 to your computer and use it in GitHub Desktop.
Certificate validation error on mac osx pyopenssl (twisted)
# When you get an error like
# ('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')
# when using twisted, autobahn, etc...
# on osx
# than you may have to update your openssl
# Do this by using brew:
# (install brew)
brew update
brew install openssl
brew link --force openssl
sudo mv /usr/bin/openssl /usr/bin/openssl_backup
sudo ln -s /usr/local/Cellar/openssl/1.0.1g/bin/openssl /usr/bin/openssl
# now a 'openssl version' should at least output OpenSSL 1.0.2d
@glyph
Copy link

glyph commented Dec 20, 2017

You don't need to update your OpenSSL binary; you just need to have trust roots installed in the Homebrew standard location (which Cryptography, and therefore pyOpenSSL, is built against).

Please see my updated gist here: https://gist.github.com/glyph/d0a95165d8fcbe8666566abd41c408c5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment