MySQL SSL problem with MyDAC 9.0.1 + SecureBridge (8.0.1) + VirtualDAC (10.1.4)

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
worsoee
Posts: 13
Joined: Fri 26 Aug 2016 16:26

MySQL SSL problem with MyDAC 9.0.1 + SecureBridge (8.0.1) + VirtualDAC (10.1.4)

Post by worsoee » Sat 13 May 2017 08:14

Hi,

We have a rather urgent problem, and hope for your assistance on this:

Using Delphi 10.2 Tokio, we're getting the exception: "The certificate is not trusted by the trust provider" when connecting to MySQL server (v5.7.18). All other clients (ex. Navicat) can connect without problem using the exact same cert's, establishing SSL-connection (verified by SHOW STATUS LIKE 'Ssl_cipher').

We have created new TScFileStorage, TMySSLIOHandler and TMyConnection with the correct cert's after upgrading to Delphi 10.2 and using all new components from Devart and following instructions at https://www.devart.com/mydac/docs/?secu ... ctions.htm).

The connection string contains this: Protocol=mpSSL;Login Prompt=False;Pooling=True;Max Pool Size=21;Min Pool Size=1;User ID=xxx;Password=xxx;Connection Timeout=14;Use Unicode=True;Character Set=utf8;Data Source=xxx;Database=xxx;Port=xxxx;Compress=True

The .IOHandler of the TMyConnection is set to TMySSLIOHandler in the connection. The exception is raised in line 267 of module TCRSSLIOHandler.

Are we doing something wrong, are there anything we need to do differently in the new environment?

Best regards,

Carsten

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MySQL SSL problem with MyDAC 9.0.1 + SecureBridge (8.0.1) + VirtualDAC (10.1.4)

Post by ViktorV » Sat 13 May 2017 09:57

To solve the issue you can set the TMyConnection.SSLOptions.TrustServerCertificate property to True. For example:

Code: Select all

  MyConnection.SSLOptions.TrustServerCertificate := True;

worsoee
Posts: 13
Joined: Fri 26 Aug 2016 16:26

Re: MySQL SSL problem with MyDAC 9.0.1 + SecureBridge (8.0.1) + VirtualDAC (10.1.4)

Post by worsoee » Mon 15 May 2017 08:31

Hi Viktor,

Thanks a lot - good and fast service, it works perfect :D !

Best regards, Carsten

PS! We haven't needed to set this parameter before, so we focused on the big upgrade of Delphi and all components from Devart when trying to locate the error. Sorry for taking your time with this...

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MySQL SSL problem with MyDAC 9.0.1 + SecureBridge (8.0.1) + VirtualDAC (10.1.4)

Post by ViktorV » Mon 15 May 2017 15:10

Thank you for being interested in our products.
Feel free to contact us if you have any further questions about our products.

Post Reply