Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2023-04

TLS connection to MySQL

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Koenraad Lelong

Hi,
I'm updating an application that uses TSQLConnector to connect to MySQL 5.7. The MySQL server (5.7.42) will be restricted to use only TSLv1.2 (or higher).
Is this possible with TSQLConnector ?
TLSv1.1 works without configuring anything.
With my test-server, it fails to connect when this is set to allow only TLSv1.2.
The application will run on Windows 11 if that matters. My libmysql.dll is version 5.7.42.0, in the same directory as the application.

Thanks,
Koenraad

Reply by email

Michael Van Canneyt
to Koenraad Lelong
Koenraad Lelong wrote 11 lines
Hi, I'm updating an application that uses TSQLConnector to connect to MySQL 5.7. The MySQL server (5.7.42) will be restricted to use only TSLv1.2 (or higher). Is this possible with TSQLConnector ? TLSv1.1 works without configuring anything. With my test-server, it fails to connect when this is set to allow only TLSv1.2. The application will run on Windows 11 if that matters. My libmysql.dll is version 5.7.42.0, in the same directory as the application.

TSQLConnector will only pass on any connection parameters you set up to the mysql layer.

If it fails for a particular TLS version, then I think it is more likely that the libmysql.dll is too old (or the openssl lib that it uses) and does not properly support TLSv1.2.

Michael.

Reply by email

Koenraad Lelong
to Michael Van Canneyt

Op 20/04/2023 om 14:43 schreef Michael Van Canneyt via lazarus:

TSQLConnector will only pass on any connection parameters you set up to the mysql layer.

So I can give parameters for the connection. Are those documented ? Like I said, to use TLSv1.1 I don't have to do anything.

If it fails for a particular TLS version, then I think it is more likely that the libmysql.dll is too old (or the openssl lib that it uses) and does not properly support TLSv1.2.

That is possible, but I just updated the server to the latest version 5.7.42, and I took the libmysql.dll from that.
Is there a way to check the used/needed openssl version ?

I'm using MySQL workbench, and that connects OK via TLSv1.2. So I copied it's libssl-1_1-x64.dll to the app-directory. No progress.

Koenraad

Reply by email

Koenraad Lelong
to Koenraad Lelong

Please ignore.
PEBKAC.
I copied the dll to the wrong directory.

Thanks anyway.

Op 20/04/2023 om 15:07 schreef Koenraad Lelong via lazarus:

Show quoted text 19 lines
Op 20/04/2023 om 14:43 schreef Michael Van Canneyt via lazarus: > TSQLConnector will only pass on any connection parameters you set up > to the > mysql layer. So I can give parameters for the connection. Are those documented ? Like I said, to use TLSv1.1 I don't have to do anything. > > If it fails for a particular TLS version, then I think it is more > likely that the libmysql.dll is too old (or the openssl lib that it > uses) and does not properly support TLSv1.2. That is possible, but I just updated the server to the latest version 5.7.42, and I took the libmysql.dll from that. Is there a way to check the used/needed openssl version ? I'm using MySQL workbench, and that connects OK via TLSv1.2. So I copied it's libssl-1_1-x64.dll to the app-directory. No progress. Koenraad

Reply by email