Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Sep : DataPortProtection - how use it by code??

www.cryer.info
Managed Newsgroup Archive

DataPortProtection - how use it by code??

Subject:DataPortProtection - how use it by code??
Posted by:"Alessandro Pugno" (pug..@consulinformatica.it)
Date:Mon, 24 Sep 2007 10:43:49

I have to create an object derived from idftp, using ssl ecc..
Indy 10.1.5

I try using a form with the objects within, i configured all and it works.
When I try to use it in an unit with the code below, i get an error when I
configure this parameters:

DataPortProtection:=ftpdpsPrivate;

I saw somewhere the exist a function SetDataPortProtection the write the
property, but it doesn't works
Where i fault???


constructor tMyFtp.Create;
begin
fFtp:= TIdFTP.Create(nil);
  fFtp.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(fFtp);
  TIdSSLIOHandlerSocketOpenSSL(fFtp.IOHandler).SSLOptions.Method:=sslvTLSv1;
  TIdSSLIOHandlerSocketOpenSSL(fFtp.IOHandler).SSLOptions.Mode:=sslmBoth;
  TIdSSLIOHandlerSocketOpenSSL(fFtp.IOHandler).Destination:=HostPostel;
  TIdSSLIOHandlerSocketOpenSSL(fFtp.IOHandler).DefaultPort:=2110;
  with fFtp do
  begin
  Passive:=true;
  Host:=HostPostel;
  UseTLS:=utUseExplicitTLS;
  AUTHCmd:= tAuthTLSP;
  AutoLogin:=true;
  DataPort:=2110;
  Port:=2110;
  DataPortMin:=20000;
  DataPortMax:=20100;
  UseExtensionDataPort:=true;
----------------------
DataPortProtection:=ftpdpsPrivate;
--------------------------------------

Replies:

www.cryer.info
Managed Newsgroup Archive