Reputation: 41
I execute this code and get error: Could not load SSL lib
Class: EIdOSSLCouldNotLoadSSLLibrary
I do not use .net.
var
Client: TIdHTTP;
tokenURL: String;
begin
client := TIdHTTP.Create(nil);
try
client.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(client);
TIdSSLIOHandlerSocketOpenSSL(client.IOHandler).SSLOptions.Method := sslvSSLv23;
client.HandleRedirects := False;
client.Get('https://www.xxxxx.xx/portal/ILlogin?username=XXXXXX&password=XXXXXXXX&skin=yyyyyyyyyy&portal=GG', [300, 301, 302, 303, 305, 306, 307]);
if client.Response.Location <> '' then
tokenURL := client.Response.Location;
finally
client.Free;
end;
end;
Upvotes: 4
Views: 5290
Reputation: 598134
Indy's WhichFailedToLoad()
function in the IdSSLOpenSSLHeaders
unit will tell you why OpenSSL could not be loaded. Either you do not have the OpenSSL DLLs installed, or you have an incompatible version of the DLLs installed that is missing functionality that Indy is looking for. Try the DLLs that are available at Indy's Fulgan mirror.
Upvotes: 7