Ensuring that SSL is being used with TMyConnection component

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jamesp81
Posts: 1
Joined: Wed 26 Apr 2006 21:58

Ensuring that SSL is being used with TMyConnection component

Post by jamesp81 » Wed 26 Apr 2006 22:11

I am currently writing a program that will connect to a mysql DB across the internet. Because some of the information that will be exchanged is private, using SSL will be necessary.

I *think* that SSL is enabled with the hosting provider I'm using (I know that when search for variables like "%ssl" I get have_openssl = yes).

In my software that I'm writing, I have my TMyConnection object set to use mpSSL protocol, and it successfully connects to the database. IIRC, however, mysql will use the default, unencrypted protocol if the encrypted connection attempt fails. Is there any way I can tell if the connection is using SSL?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 27 Apr 2006 10:16

The settings you have made are not enough. You should also create user with REQUIRE SSL option and connect to server using this user's name. If you try to connect to user that was created with this option with invalid certificates, the connection will fail. If user wasn't created with REQUIRE SSL option, non-encrypted connection will be established.

nelson
Posts: 7
Joined: Sun 02 Mar 2008 22:52

Post by nelson » Sun 02 Mar 2008 23:31

hello

i have the same problem. what to do, if it's not possible to use REQUIRE SSL for an MySQL user? is it not possible, that MyDAC can disconnect if the connection is not SSL secured?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 04 Mar 2008 12:00

TMyConnection does not allow to know secured or not secured connection was established.

In order to solve this problem, you can use security-oriented SecureBridge components, that are integrated with MyDAC.
SecureBridge's component TMySSLIOHandler lets MyDAC connect to MySQL server through SSL connection and gives you possibility to control secured connection. You can find more detailed information about SecureBridge by the following link: http://crlab.com/sbridge/

Post Reply