DLLSSLName = 'libssl.so';
DLLUtilName = 'libcrypto.so';
Yeah, that's why I let you run that simple example. Those libraries need to be found. So you just have a openssl problem.
Did you copy the exact libssl.so or still libssl1.0.0.so or something?libssl.so in your project directory doesn't work. See edit below.
Normally you create a symbolic link with the name libssl.so to the real libssl.so file.
Like:
# ls /usr/lib/i386-linux-gnu/libssl*.so
lrwxrwxrwx 1 root root 15 Jan 27 01:19 /usr/lib/i386-linux-gnu/libssl.so -> libssl.so.1.0.0
# cat /etc/ld.so.conf.d/i386-linux-gnu.conf
# Multiarch support
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/lib/i586-linux-gnu
/usr/lib/i586-linux-gnu
So my guess is you didn't install libsslx.y.z and libssl-dev correctly.
i.e. sudo apt-get install libssl1.0.0 libssl-dev
And where did you get the files? Are you sure you took the 32 bit ones if you compile your project in 32 bit (and 64 bit otherwise)?
What does the Socket.SSL.LibName and Socket.SSL.LibVersion give you? Is it blank (no openssl found) or does it show your libssl.so version?
Edit: O, and B.T.W. Linux doesn't check your project directory for the library.
See:
http://wiki.freepascal.org/Lazarus/FPC_LibrariesLinux
A dynamic library filename always has the form 'lib'+packagename+'.so'+version. For example: libz.so.1 and libz.so.1.2.2.
Linux searches a library in this order:
- first in the paths of the environment variable LD_LIBRARY_PATH
- then in /lib
- then /usr/lib
- finally the paths of /etc/ld.so.conf
Using ldconfig after copying your library file into a lib directory may help with caching issues.
To share memory (GetMem/FreeMem, strings) with other libraries (not written in FPC) under Linux, you should use the unit cmem. This unit must be added as the very first unit in the uses section of the project main source file (typically .lpr), so that its initialization section is called before any other unit can allocate memory.
So you need to create a symbolic linked file libssl.so in one of these directories to you libsslx.y.z.so version libssl. And then run ldconfig. After that loading the library should work.