Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated TLSv1 and encodestring usage. #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

phibbs7
Copy link

@phibbs7 phibbs7 commented Apr 25, 2022

The first patch fixes #3 (TLSv1 is disabled by default on newer distros. The patch allows the host to choose the TLS version.)
The second patch fixes #4 (Replaces the deprecated encodestring in python 3 with encodebytes.)

The code previously only allowed the use of TLSV1 during ticket and VV file retrival, which is broken on newer servers.
TLSV1 and older are deprecated by the industry due to security concerns.
Newer versions of OpenSSL as well as various distros like Ubuntu (starting with 20.04) disable TLSV1 support by default.

As python3 lacks a specific PROTOCOL name for TLSV1.3 when using SSLContext, This update simply has reverted to using PROTOCOL_TLS
by default. (Disables SSLV3 and older, but allows for auto selecting any TLS version.)

Signed-off-by: Patrick Hibbs <30446633+phibbs7@users.noreply.github.com>
Python 3 deprecates encodestring and will throw warnings in the console if used.
Fix the code to use encodebytes instead. (Also uses UTF-8 for de/encode.)

Signed-off-by: Patrick Hibbs <30446633+phibbs7@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3 deprecates encodestring Some systems refuse TLSV1 connections.
1 participant