首页 > 解决方案 > How to set a lower SSL security in Debian 9?

问题描述

Im trying to connect to a SQL Server database from Rstudio via dbconnect but im getting this error. I believe its related to the openssl version i currently have on the machine serving RStudio server. I can connect to other databases

Connection

# Conexion DB
dbcon.hic <- dbConnect(odbc::odbc(), 
                 Driver = "ODBC Driver 17 for SQL Server", 
                 server = "172.2.1.4", # remember \\ if your path has a \ 
                 database = "TEST1",
                 uid = "XXXXX",
                 pwd = "YYYYY",
                 Trusted_Connection= "No" ) 

Error

Error: nanodbc/nanodbc.cpp:1021: 00000: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746  [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection 

I have found this workaround procedure in which i perform the following changes on the openssl.cnf file in order to decrease the security level. My initial file didnt have these lines.

Start of file

#System default
openssl_conf = default_conf

End of file

[ default_conf ]
ssl_conf = ssl_sect

[ssl_sect]
system_default = ssl_default_sect

[ssl_default_sect]
MinProtocol = TLSv1.2
CipherString = DEFAULT:@SECLEVEL=1

I have located file /usr/local/openssl/openssl.cnf so i set this parameter globally (initially for testing). Unfortunately, this is not helping to fix my issue and the error still occurs.

admin@bell:/etc/ssl$ openssl version -a
OpenSSL 1.0.1k 8 Jan 2015
built on: Fri Jul  9 10:51:46 2021
platform: linux-x86_64
options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx) 
compiler: -I. -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: "/usr/local/openssl"

I have also tried to downgrade to an earlier version using this but still no luck

标签: ropenssldebian

解决方案


推荐阅读