How do I use MyDAC's SSLOptions to make a secure connection?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
docH
Posts: 59
Joined: Sun 22 Dec 2013 15:18

How do I use MyDAC's SSLOptions to make a secure connection?

Post by docH » Thu 21 May 2015 09:29

I'm using MyDAC very successfully to connect a Delphi 2009 application to a remote MySQL database on some ISP via port 3306.

Now I want to make the connection secure so that the logon credentials cannot be intercepted.

I note that TMyConnection has options to use mpSSL and also has properties called SSLOptions but I don't understand what they do

Please can sombody explain (simply!) how I should use these properties to create a secure connection - if that's possible.

In case it helps, I already have libeay32.dll, ssleay32.dll and openssl.exe in the same folder as the delphi executable as they are used by Overbytes ICS SLL to send secure email via my application, although I got that working by trial and error and following demos rather than understanding it fully.

I'd rather not have to pay another $99 to buy SecureBridge just for this one application if MyDAC can already do what I want but I'll buy it if that is what it takes - (provided it is as easy to use as MyDAC)

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

Re: How do I use MyDAC's SSLOptions to make a secure connection?

Post by ViktorV » Thu 21 May 2015 12:38

You can use MyDAC to create SSL connection to MySQL server in 2 ways:
1. Using the ssleay32.dll and libeay32.dll libraries. You can find more detailed information about this in MyDAC help: http://www.devart.com/mydac/docs/#devar ... ptions.htm
2. Using SecureBridge components. This way is more convenient and faster. You can find more detailed information about this in MyDAC help: http://www.devart.com/mydac/docs/#secureconnections.htm
If you have any additional questions after reading help, please contact us again.

docH
Posts: 59
Joined: Sun 22 Dec 2013 15:18

Re: How do I use MyDAC's SSLOptions to make a secure connection?

Post by docH » Thu 21 May 2015 13:35

Thank you, I had already read both of those. I didn't find them very useful hence my post on here to see if anyone had actrually used it and could give examples of code.

eg, the explanation as to what the ChipherList property does is;
ChipherList is the list of allowed ciphers to use for SSL encryption.
- Err, yes, but what does that mean? how do we use it? what does aa list of allowed encryptions look like?

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

Re: How do I use MyDAC's SSLOptions to make a secure connection?

Post by ViktorV » Fri 22 May 2015 10:16

You can find the detailed description of the property in the MySQL server documentation: https://dev.mysql.com/doc/refman/5.0/en ... ssl-cipher
To have support for all the encryption algorithms, set the TMyConnection.SSLOptions.ChipherList property to ALL.

Post Reply