3

I have a MySQL server and I have the client certificate and keys for SSL connection to the MYSQL server. In delphi that uses MyDAC for connecting to mysql, I can use:

MySQL1Connection.SSLOptions.CACert := 'file location'
MySQL1Connection.SSLOptions.Cert := 'file location'
MySQL1Connection.SSLOptions.Key := 'file location'
MySQL1Connection.SSLOptions.ChipherList := 'All';
MySQL1Connection.Options.Protocol := mpSSL;

But the problem in the above application is that, I have to supply the files to the client. Now, I want to hardcode the content of the file in the .exe, such that I will not have to deliver the files to the client.

Do you know any cleaver way to do this?

  • 1
    Embed it as a resource in the EXE. then extract it via TResourceStream to a temp folder. when done, delete it. – kobik Aug 17 '16 at 12:32
  • Thanks for your suggestion. I got another way of doing it. There is a storage component in the securebridge component list. Using that component will solve the problem. – user6725114 Aug 23 '16 at 07:55
  • Please post that as an answer to your own question. explain which component did you use and how, so it could be useful to others. – kobik Aug 23 '16 at 08:07

1 Answers1

1

I have solved the problem by using the TScFileStorage component of secure bridge components (https://www.devart.com/sbridge/components.html)

The steps are available in the the section 3. of this link: https://www.devart.com/mydac/docs/?secureconnections.htm