[SOLVED] Could not load SSL Library Indy Internet Direct with OpenSSL 1.1 lazarus / 21-General ---------------------------------------------------------------------- Codrut1001 · 2023-11-21 16:36 I recently have downloaded Indy Internet Direct for Lazarus on Windows. This version to be exact: https://github.com/IndySockets/Indy/releases/tag/RADStudio-Alexandria So I tried the same code I used on Windows to get the source code of a website: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button2Click(Sender: TObject);var  R: TStringStream;  SSLIOHandler: TIdSSLIOHandlerSocketOpenSSL;  HTTP: TIdHTTP;begin  HTTP := TIdHttp.Create(nil);  try    // IO Handler    SSLIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(HTTP);    HTTP.IOHandler := SSLIOHandler;     SSLIOHandler.SSLOptions.SSLVersions := [sslvTLSv1_2];      Memo1.Lines.Text := HTTP.Get('http://www.google.com/');  finally    HTTP.Free;  end;end; But I get the "Could not load SSL library". After a while, I found that I had openssl 1.1, and Indy expected Indi 1.0.2 or an older version, as in 1.1 major changes were made. So than I ran into this post on stack overflow: https://stackoverflow.com/questions/68415506/delphi-indy10-required- ssl-libraries-under-linux Which suggested a pull request, for which, I promptly downloaded the code, but It does not appear to have any use for IdHTTP. So I still can't get the source code of HTTPS websites, or do any POST requests. Any ideas? ---------------------------------------------------------------------- Codrut1001 · 2023-11-21 18:50 I was able to fix the problem by just including OpenSSL 1.0.0 I used this code to fix the issue: Code: [Select]wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz  gunzip openssl-1.0.2l.tar.gz tar xf openssl-1.0.2l.tar cd openssl-1.0.2l/ ./config make install ./config shared make clean Than I placed all the ".so" files in a folder called "lib-ssh" Finally, changing the library search path with Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i IdOpenSSLSetLibPath( './lib-ssl/' ); ---------------------------------------------------------------------- donaldklopper · 2024-11-01 21:45 This worked a charm! Thank you! I had to make some small adjustments... but they were obvious enough. It might help someone else. Copy the .so files out before you run make clean... Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz gunzip openssl-1.0.2l.tar.gztar xf openssl-1.0.2l.tarcd openssl-1.0.2l/./configmake install./config shared..... copy .so files to your preferred locationmake clean  Include this in your uses Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    uses    IdSSLOpenSSLHeaders;  to be able to set the path: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   procedure TForm1.Button2Click(Sender: TObject);var  R: TStringStream;  SSLIOHandler: TIdSSLIOHandlerSocketOpenSSL;  HTTP: TIdHTTP;begin  IdOpenSSLSetLibPath( '...your_path..' );    HTTP := TIdHttp.Create(nil);  etc etc etc. end;