Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Brian Anstett
5,831 Pointsopenssl and Python
Hello everyone, In my free time I've been fooling around with a few python libraries and openssl to create web scanning tools for my fellow system engineers. The main premise of the tools is that it scans an entire network for hosts listening on 443, 8443, etc and tries to establish a connection using a bunch of different protocol/cipher combinations. The results is a list of servers on that network and the various protocols, ciphers it supports. This allow admin's to quickly scan their environment and make changes.
One of the main hurtles I'm having is that most modern Linux distro's ship with a pretty up-to-date version of openssl which by default doesn't support SSLv2 or SSLv3. This of course is better for security but bad for me because I want to TRY and make a connection using both of those protocols.
WHAT I'VE TRIED: I installed a static version of openssl that is used in TestSSL(https://testssl.sh/) which showed promise because I was then able to establish a connection with those servers using just the openssl command line utility ("openssl s_client -connect .... etc"). However, in python, using the "ssl" and "pyOpenSSL" library, I get errors (saying it can't support those protocols)
MY QUESTION: How does the ssl library or the pyopenssl library "interface" with openssl? I suspect that python is "talking" with openssl in other ways and therefore still using the newer version of openssl and not the TestSSL openssl that I statically built.
Thanks for the insight every one!
1 Answer

Chris Freeman
Treehouse Moderator 68,468 PointsYou may need to go back in the source code repository to find the version of pyopenssl that works with the old version of OpenSSL that you wish to use.
If you need an older version of OpenSSL, you can also back in the source code to find the compatible version you need.