Re: HTTPS using Indy
- From: Dodgy <Dodgy@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 16:25:52 +0100
On 30 Aug 2005 05:57:35 -0700, "Otavio Macedo"
<otaviomacedo@xxxxxxxxx> waffled on about something:
>>The client should need nothing else except a route to connect to the
>>server. Usually this will be on port 443.
>
>Great! One problem less.
>
>>I assume you have the SSL dll's (libeay32.dll and ssleay32.dll) for
>>indy to use?
>
>I have put these dll's in the application directory, but when I call
>the TIdHTTP get method to a "https" URL, I receive the following error
>message: "Could not load SSL Library".
>
>I have been googling for this, but all the documents I find tell that
>it suffices to have the dll's. Well, it is not my case...
Well with Indy9, this is what works for me.
var
IdSSLIOHandlerSocket1: TIdSSLIOHandlerSocket;
IdHTTP1: TIdHTTP;
begin
IdSSLIOHandlerSocket1 := TIdSSLIOHandlerSocket.Create(Self);
with IdSSLIOHandlerSocket1 do
begin
Name := 'IdSSLIOHandlerSocket1';
SSLOptions.Method := sslvSSLv2;
SSLOptions.Mode := sslmUnassigned;
SSLOptions.VerifyMode := [];
SSLOptions.VerifyDepth := 0;
end;
IdHTTP1 := TIdHTTP.Create(Self);
with IdHTTP1 do
begin
Name := 'IdHTTP1';
IOHandler := IdSSLIOHandlerSocket1;
Port := 443;
AllowCookies := True;
ProxyParams.BasicAuthentication := False;
ProxyParams.ProxyPort := 0;
Request.ContentLength := -1;
Request.ContentRangeEnd := 0;
Request.ContentRangeStart := 0;
Request.Accept := 'text/html, */*';
Request.BasicAuthentication := False;
Request.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)';
HTTPOptions := [hoForceEncodeParams];
end;
end;
Dodgy
--
MUSHROOMS ARE THE OPIATE OF THE MOOSES
.
- References:
- HTTPS using Indy
- From: Otavio Macedo
- Re: HTTPS using Indy
- From: Dodgy
- Re: HTTPS using Indy
- From: Otavio Macedo
- HTTPS using Indy
- Prev by Date: Re: OOP style
- Next by Date: How to kill a busy thread?
- Previous by thread: Re: HTTPS using Indy
- Next by thread: having difficulty getting the unit to use an include file
- Index(es):