I recently have downloaded Indy Internet Direct for Lazarus on Windows. This version to be exact:
https://github.com/IndySockets/Indy/releases/tag/RADStudio-AlexandriaSo I tried the same code I used on Windows to get the source code of a website:
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-linuxWhich 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?