Forum > Networking and Web Programming
"Could not load SSL library" and questions about Indy, Lazarus and Linux
SlackerNReckless:
Hi :)
I'm not exactly new here as you can see but let's say I was out all this time.
Well, I compiled and I installed Indy not by the Online Package Manager, but it was here with added support for OpenSSL 1.1.1 and TLS 1.3 from the file "OpenSSL.zip" found here: https://github.com/IndySockets/Indy/pull/299
It works fine in Windows, all I need to do is just copy the four DLL files to the path of the program or copy them to system32 folder, you know, the DLL files libeay32.dll, ssleay32.dll, libcrypto-1_1.dll and libssl-1_1.dll
I use Slackware 15 and I installed the package "openssl-1.1.1m" and the libraries libssl.so and libcrypto.so are in the LD path, /usr/lib64/ but not the other two.
But I don't know how to do this in Linux. Where does the program find then? How do I load them? Do I need to link the executable with the libraries? How do I do that?
Anyway, thanks in advance for reading this and my best regards! :D
P.S. I'm aware Remy Lebeau, Indy admin, is a member of this forum. It would be nice to receive a reply of him. ;)
dbannon:
Slackware seems a little, er, slack, with new versions. 15 dates back to Feb 2022, more than 3 years ago ?
I suspect that openssl-1.1.1m is just a bit too old to be honest.
You did not mention if your problem was as build (ie link) time or run time. But if you installed the libraries correctly then the OS will have no problem finding them. But 1.1.1 does not support the protocols you must use today (a run time).
Davo
SlackerNReckless:
Ok, I installed latest FPC 3.2.2 and Lazarus, 3.4. They were from SlackBuild packages as there are no official Lazarus packages for Slackware.
https://slackbuilds.org/repository/15.0/development/fpc/
https://slackbuilds.org/repository/15.0/development/lazarus/
I'm an old Slackware user and I'm a Delphi programmer, I have several Delphi apps, some use TIdHTTP and the SSL IO Handler TIdSSLIOHandlerSocketOpenSSL
And only recently I decided to move them to Lazarus, first in Windows then porting to Linux later.
Both FPC and Lazarus were installed and are working fine.
As a "Test" to see how the SSL would work I just made a simple test application.
Basically I added a TButton, a TMemo, a TidHTTP and the handler TIdSSLIOHandlerSocketOpenSSL. Of course I set up the IO Handler in TIdHTTP and tried to make a simple GET request
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.Button1Click(Sender: TObject);begin Memo1.Lines.Text := IdHTTP1.Get('https://www.google.com/');end;
Doing the request without the "https" works.
I imagined it would find the SSL libraries in the path but all I get is a raised exception saying "Could not load SSL library". In Windows is simple, just put those 4 DLL files in the program path or windows/system32.
And like I said I have openssl 1.1.1m installed; It's a package that comes of Slackware Linux.
I would like to know where I put the SSL libraries and how they are loaded. I tried doing links of libssl.so and libcrypto.so in the program path but it didn't work.
Anyway, thanks for replying me. :)
Jurassic Pork:
hello,
try this in a terminal console :
--- Quote ---ldconfig -p | grep crypto
ldconfig -p | grep ssl
--- End quote ---
and show us what is the result.
Friendly, J.P
SlackerNReckless:
--- Code: ---root@SUCCUBUS:/# ldconfig -p | grep crypto
libk5crypto.so.3 (libc6,x86-64) => /lib64/libk5crypto.so.3
libk5crypto.so.3 (libc6,x86-64) => /usr/lib64/libk5crypto.so.3
libk5crypto.so.3 (libc6) => /lib/libk5crypto.so.3
libk5crypto.so.3 (libc6) => /usr/lib/libk5crypto.so.3
libk5crypto.so (libc6,x86-64) => /usr/lib64/libk5crypto.so
libk5crypto.so (libc6) => /usr/lib/libk5crypto.so
libcryptopp.so.8 (libc6,x86-64) => /usr/lib64/libcryptopp.so.8
libcryptopp.so (libc6,x86-64) => /usr/lib64/libcryptopp.so
libcrypto.so.1.1 (libc6,x86-64) => /lib64/libcrypto.so.1.1
libcrypto.so.1.1 (libc6,x86-64) => /usr/lib64/libcrypto.so.1.1
libcrypto.so.1.1 (libc6) => /lib/libcrypto.so.1.1
libcrypto.so.1.1 (libc6) => /usr/lib/libcrypto.so.1.1
libcrypto.so.1 (libc6) => /lib/libcrypto.so.1
libcrypto.so (libc6,x86-64) => /usr/lib64/libcrypto.so
libcrypto.so (libc6) => /usr/lib/libcrypto.so
libbd_crypto.so.2 (libc6,x86-64) => /usr/lib64/libbd_crypto.so.2
libbd_crypto.so (libc6,x86-64) => /usr/lib64/libbd_crypto.so
root@SUCCUBUS:/# ldconfig -p | grep ssl
libssl3.so (libc6,x86-64) => /usr/lib64/libssl3.so
libssl3.so (libc6) => /usr/lib/libssl3.so
libssl.so.1.1 (libc6,x86-64) => /lib64/libssl.so.1.1
libssl.so.1.1 (libc6,x86-64) => /usr/lib64/libssl.so.1.1
libssl.so.1.1 (libc6) => /lib/libssl.so.1.1
libssl.so.1.1 (libc6) => /usr/lib/libssl.so.1.1
libssl.so.1 (libc6) => /lib/libssl.so.1
libssl.so (libc6,x86-64) => /usr/lib64/libssl.so
libssl.so (libc6) => /usr/lib/libssl.so
libgnutls-openssl.so.27 (libc6,x86-64) => /usr/lib64/libgnutls-openssl.so.27
libgnutls-openssl.so.27 (libc6) => /usr/lib/libgnutls-openssl.so.27
libgnutls-openssl.so (libc6,x86-64) => /usr/lib64/libgnutls-openssl.so
libgnutls-openssl.so (libc6) => /usr/lib/libgnutls-openssl.so
libevent_openssl-2.1.so.7 (libc6,x86-64) => /usr/lib64/libevent_openssl-2.1.so.7
root@SUCCUBUS:/#
--- End code ---
I have "multilb" installed as I run WINE (Wine Is Not an Emulator) here hence the 32 bit libraries and the fact there are several 32 bits Windows applications..
Operating system is Slackware Linux 15 64 bits.
Navigation
[0] Message Index
[#] Next page