3

I am writing a spring boot application which uses MS Sql jdbc driver to connect to an SQL Server located in a remote machine.

According to microsoft's documentation i have enabled the setEncryption option which enabled the secured connection.

Version of spring boot is 1.5.8.

Ms Sql jdbc client version

<mssql-jdbc.version>6.1.0.jre7</mssql-jdbc.version>

How do i set the TLS versions that should be used to do the handshake with the server ?

According to MS Doc, the driver should use the ssl settings that are set in the JSSE.

So, i added the following settings in the application.yml

server:
    ssl:
        enabled: true
        protocol: TLS
        enabled-protocols: TLSv1.2

I suppose this configuration should be picked up by spring boot and ultimately by the JSSE.

But this doesn't seem to work.

Wireshark trace shows that the tls version used is still 1.0

enter image description here

I googled a lot but didn't find any direct API or config file to set the TLS version configuration to the JSSE of the application.

I know that SSLContext with SSLContextFactory etc can be used to configure the TLS versions and for http/https calls.

But how do i set to JSSE so that MS SQL Jdbc driver uses that configuration to create a connection.

Sebastien D
  • 4,369
  • 4
  • 18
  • 46

0 Answers0