Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to disable TLSv1.0 and TLSv1.1 in python 2.7

Highlighted

how to disable TLSv1.0 and TLSv1.1 in python 2.7

Contributor

I am using python2.7 on RHEL7.4.

I want to disable TLSv1.0 and TLSv1.1. I have a solution for this. We need to add the below steps in /usr/lib64/python2.7/ssl.py script.

context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.options |= ssl.OP_NO_SSLv2
context.options |= ssl.OP_NO_SSLv3
context.options |= ssl.OP_NO_TLSv1
context.options |= ssl.OP_NO_TLSv1_1

But I don't know how to check those two protocols are disabled or not. I need a help on this.

Don't have an account?
Coming from Hortonworks? Activate your account here