Page 1 of 1

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

Posted: Sat 13 May 2017 08:14
by worsoee
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

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

Posted: Sat 13 May 2017 09:57
by ViktorV
To solve the issue you can set the TMyConnection.SSLOptions.TrustServerCertificate property to True. For example:

Code: Select all

  MyConnection.SSLOptions.TrustServerCertificate := True;

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

Posted: Mon 15 May 2017 08:31
by worsoee
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...

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

Posted: Mon 15 May 2017 15:10
by ViktorV
Thank you for being interested in our products.
Feel free to contact us if you have any further questions about our products.