Connection problem on some PCs

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
OlliT2022
Posts: 1
Joined: Sat 24 Sep 2022 07:37

Connection problem on some PCs

Post by OlliT2022 » Sat 24 Sep 2022 07:59

Hi,
we work with a MySQL database hosted in the Azure Cloud and a SSL encrypted connection and use the myDAC components without SecureBridge. The required SSL DLLs are included in the path of exe file.

We have tested the software on 20 Windows 10 PCs. On 17 PCs, the connection works without any problems. On 3 PCs of different manufacturers and year of manufacture we get the following error message:
Exeption EOSError in module XXZ.exe. OpenSSL client library could not be loaded. Please place libeay32.dll and ssleay32.dll (or libssl32.dll) to system folder or to the folder with executable unit of main program.
Could this error message be related to a missing or invalid certificate authority file?
The DLL are all present in the search path. Do you have any idea what could be the reason for this?

Does an absolute path need to be specified for the SSL Options/CA Cert property or is a relative path specification sufficient here?

With best regards

Olli

pavelpd
Devart Team
Posts: 109
Joined: Thu 06 Jan 2022 14:16

Re: Connection problem on some PCs

Post by pavelpd » Thu 29 Sep 2022 13:01

Hi Olli,
Thanks for contacting us!

The error you mentioned might mean that the application cannot find the appropriate libraries on the computer.

MyDAC uses the following OpenSSL libraries names: first - libcrypto-1_1.dll and libssl-1_1.dll; second - libeay32.dll and ssleay32.dll.

MyDAC will look for the files in directories on your machine, in this order:
- The directory from which your application is loaded.
- The. //System32 system folder.
- The //SysWOW64 folder on a 64-bit system.
- The //Windows folder.
- Current workspace.
- Folders listed in the РАТН environment variable.

Also, this error may indicate a discrepancy between the bitness of the libraries used and the bitness of the application.

In case if you have a 32-bit application, the libraries also needs to be 32-bit, regardless of the MySQL Server bitness.

As a workaround, you can try to place the libeay32.dll and ssleay32.dll files in the directory with the executable file of your application.
Also to solve the issue, you can rename libeay32.dll and ssleay32.dll into libcrypto-1_1.dll and libssl-1_1.dll correspondingly.

Kindly note, that using OpenSSL libraries to create an SSL connection with MySQL server can lead to various issues.

For example, OpenSSL version can be not supported by MySQL server, the bitness of the supplied OpenSSL libraries can differ from the bitness of your application, etc.
To solve the issue, you can use the SecureBridge components.
SecureBridge allows you to establish secure connections within a single application without any external files.

In MyDAC you need to specify the absolute path, including the file name for SSLOptions: CACert\Cert\Key

Post Reply