Hi everyone,
I'm encountering an SSL handshake failure when upgrading my Python application from versions 3.8 and 3.9 to 3.11 and 3.12. The server side uses TLS 1.2. Here are the errors I'm seeing:
Thanks in advance!
I'm encountering an SSL handshake failure when upgrading my Python application from versions 3.8 and 3.9 to 3.11 and 3.12. The server side uses TLS 1.2. Here are the errors I'm seeing:
Error:Python 3.12: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1000)
Python 3.11: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1006)
I suspect this is due to a mismatch between the server and client protocols. Below is a snippet of my code:import smtplib import http.client import base64 import urllib import os host = "xyzabc.coom" path = "get/FileDetails" path = f"{SOMEPATH}/{N}/{na}/{encode_fileURL}" context = ssl.create_default_context() context.minimum_version = ssl.TLSVersion.TLSv1_2 context.maximum_version = ssl.TLSVersion.TLSv1_2 conn = http.client.HTTPSConnection(host, context=context) conn.request(method="GET", url=path, headers=headers) response = conn.getresponse() conn.close()I've tried enforcing TLS 1.2 in my code, but the issue persists. Any suggestions on how to resolve this?
Thanks in advance!
buran write Nov-15-2024, 04:24 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.