[ODBC Driver 17 for SQL Server]SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol]
os: ubuntu 20.04
server SQL server version: Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)
python 3.8
import pyodbc
cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)
Error:
[Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol] (-1) (SQLDriverConnect)')
I try to modify openssl.conf:
oid_section = new_oids
openssl_conf = default_conf
[default_conf]
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
MinProtocol = TLSv1.1
CipherString = DEFAULT@SECLEVEL=1
then reboot
but it cant work.
This might be the right approach, but I think you should lower the protocol to TLSv1.0
[system_default_sect]
MinProtocol = TLSv1.0
CipherString = DEFAULT@SECLEVEL=1
I just hit this problem trying to connect from a Debian 10 with openssl 1.1.1d to a Windows Server 2008 with MSSQL 12 Express.
Lowering the protocol version works directly, no reboot needed.