How can I reasonably support basic SSLv3 connections in a user-facing package for modern Python?
10:24 13 Dec 2023

I have a Python package for controlling a piece of lab equipment that has a server listening on a network connection. In response to changes to California law, the manufacturer updated the machine to use SSL connections rather than plain text. Unfortunately, despite being updated in the last few years, it only supports SSLv3.

As SSLv3 is insecure and deprecated (for good reason), and has been for over a decade, using it in Python is increasingly difficult. In some cases, installations will support it if the SSL context is set with ssl.TLSVersion.SSLv3 as the minimum version, but increasingly, the openssl Python is built with is compiled with SSLv3 support. While I could of course build openssl with SSLv3 support, and then build Python with that, asking my users to go through that entire process, and use a completely different, and less secure, installation of Python for just my package would not be reasonable.

Is there any way I can support SSLv3 connections for users with Python installations that don't support it in the built-in ssl module, and without openssl installations that support it, eg, through a pip-installable package?

(Note that in terms of security, SSLv3 is the least of the problems with the machines. The certificates used on the machines are self-signed, and can't be verified to begin with. The server on the machine is extremely insecure and should not be on open networks in any circumstances, something the package warns users about. In our installations we have all communication with the machines going through a specific, separate network for them.)

python ssl