Clarion
Clarion

Reputation: 41

Delphi 2010 - Could not load SSL lib

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

Answers (1)

Remy Lebeau
Remy Lebeau

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

Related Questions