Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delphi8 problem accessing https: web data - SSL
#4
(02-07-2020, 01:19 AM)rlebeau Wrote: It would help to know WHICH ones you downloaded, WHERE you placed them ... etc etc ...

I downloaded them from this site     https://indy.fulgan.com/SSL/

I put them in a directory      C:\Programs\XE8\SSL_DLL_ForScraping

I have the    Project -> Options -> Search Path  going thru this directory

On FormCreate I added this code:

Code:
procedure TForm1.FormCreate(Sender: TObject);
begin
  SSLDir := 'c:\programs\XE8\SSL_DLL_ForScraping';
  IdOpenSSLSetLibPath(SSLDir);
end;

(02-07-2020, 01:19 AM)rlebeau Wrote: Sure, since it doesn't use SSL/TLS, and Indy doesn't load OpenSSL until it is actually needed.

Response - OK, thanks

(02-07-2020, 01:19 AM)rlebeau Wrote: You can use Indy's WhichFailedToLoad() function in the IdSSLOpenSSLHeaders unit to find out why.  Either the DLLs themselves could not be loaded into memory (ie, using 32bit DLLs in a 64bit project or vice versa, or mixing different versions of the DLLs together), or the DLLs are missing required function exports that Indy uses.

This is the code:

Code:
function GetPage(aURL: string): string;
var
  Response: TStringStream;
  HTTP: TIdHTTP;
begin
  Result := '';
  Response := TStringStream.Create('');
  try
    HTTP := TIdHTTP.Create(nil);
    try
      HTTP.Get(aURL, Response);     <--------  Failure is here
      //  WhichFailedToLoad;                < -------   Where/how do I use this ??  Did not work here.
      if HTTP.ResponseCode = HTTP_RESPONSE_OK then begin
        Result := Response.DataString;
      end else begin
        // TODO -cLogging: add some logging
      end;
    finally
      HTTP.Free;
    end;
  finally
    Response.Free;
  end;
end;
Reply


Messages In This Thread
RE: Delphi8 problem accessing https: web data - SSL - by rmwatson3rd@gmail.com - 02-07-2020, 03:41 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)