This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: "dh low key " issue when try to connect mysql
Type: resource usage Stage: resolved
Components: SSL Versions: Python 3.10
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: ajithmsm555, christian.heimes
Priority: normal Keywords:

Created on 2021-12-20 07:22 by ajithmsm555, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue.txt ajithmsm555, 2021-12-20 07:22 SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:997)
Messages (2)
msg408947 - (view) Author: Ajith MsM (ajithmsm555) Date: 2021-12-20 07:22
i have tried to connect my db using python 3.10. 
import module is mysql.connector.
db has installed in AWS. while excuting pycharm able to connect the db to get the output. 
using CMD prompt in windows not able to execute facing error like "dh low key" error code 2055. 


But able to connect and execute on python 3.9.9 verision could you please fix the 3.10 and above versions.
msg408958 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-20 12:58
DH_KEY_TOO_SMALL means that you are using weak and easy to break keys for your connections. Recent versions of OpenSSL prevent insecure connections. You can lower the security setting for a context with:

>>> import ssl
>>> context = ssl.create_default_context()
>>> context.set_ciphers("DEFAULT@SECLEVEL=1")

You need to figure out yourself how to pass an insecure context to your database connector.
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90294
2021-12-20 12:58:35christian.heimessetstatus: open -> closed
resolution: wont fix
messages: + msg408958

stage: resolved
2021-12-20 07:22:12ajithmsm555create