Skip to content

Instantly share code, notes, and snippets.

View gabehollombe-spire's full-sized avatar

Gabe Hollombe gabehollombe-spire

View GitHub Profile
@gabehollombe-spire
gabehollombe-spire / gist:c78cb8d65f143f053a1737fa0b2d22e4
Created February 7, 2017 03:18
Fix Python OpenSSL errors on MacOSX
From: https://comeroutewithme.com/2016/03/13/python-osx-openssl-issue/
Python + OSX OpenSSL Issue
Posted on March 13, 2016 by carlniger
I recently ran into an issue with the requests library in Python and TLS 1.1 and 1.2. I was trying to build out some scripts to configure some stuff in Cisco ACI but was getting errors when using HTTPS. Using HTTP, the script would execute just fine. Okay so that’s pretty obvious that the issue is around the encryption bits, but my good friend Google kind of let me down while searching for a fix. So I started dorking about in ACI to see if there was anything I could do (who knows what!), and experimented with disabling TLS 1.1 and 1.2, leaving only TLS 1.0 enabled. This got me an SSLv3 error about invalid cert I believe. I started going down the path of forcing my script to use SSLv2 but got stymied pretty quickly there by my lack of Python skills. Okay so flipping TLS 1.1 and 1.2 back on I got a different error than with 1.0 on — which I guess is a good thing since its some