RedHat8 (CentOS) reports SSL Error: 141A318A when Connecting to the database ODBC under

created at 10-25-2021 views: 3


RedHat 8, including CentOS 8.

Regardless of Python or php, calling ODBC to connect to SQL Server will report this error:

SSL Provider: [error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small]

The specific reason is that the security level is increased by default in the RadHat 8 system, the use of TLS1.0 TLS1.1 SSH2 is disabled, and 1024-bit DH keys are not allowed.

Reference materials:


It is not recommended to lower the default security level of RedHat 8. If your business is relatively old or the database version is lower, you must perform the downgrade as the root user:

update-crypto-policies --set LEGACY
created at:10-25-2021
edited at: 10-25-2021: