curl-library
Passive mode with FTPS connection
Date: Thu, 7 May 2009 09:35:08 +0200
Hi,
I'm using curl-7.19.4 (win 32) - libcurlnet-1_3 and I have a question:
the ftps server admin, I'm trying to connect to, sent me the url and the
account used to connect to the ftps server. After he wrote:
FTPS Configuration :
-FTPES over explicit
-Passive mode
The first should mean that the url must be ftp:// and after I specify
the usage of SSL. Is it ok?
But the second?
Does the second configuration involve my code which is:
Curl.GlobalInit((int)CURLinitFlag.CURL_GLOBAL_ALL);
myEasy = new Easy();
//write function
Easy.WriteFunction wf = new
Easy.WriteFunction(OnWriteListData);
myEasy.SetOpt(CURLoption.CURLOPT_WRITEFUNCTION, wf);
//debug function
Easy.DebugFunction df = new Easy.DebugFunction(OnDebug);
myEasy.SetOpt(CURLoption.CURLOPT_DEBUGFUNCTION, df);
//other settings
myEasy.SetOpt(CURLoption.CURLOPT_VERBOSE, true);
myEasy.SetOpt(CURLoption.CURLOPT_HTTPPROXYTUNNEL, true);
//proxy settings
myEasy.SetOpt(CURLoption.CURLOPT_PROXY, strProxyServer);
myEasy.SetOpt(CURLoption.CURLOPT_PROXYPORT,
strProxyPort);
myEasy.SetOpt(CURLoption.CURLOPT_PROXYUSERPWD,
strProxyAccount);
myEasy.SetOpt(CURLoption.CURLOPT_PROXYAUTH,
CURLhttpAuth.CURLAUTH_NTLM);
//ftp server settings
myEasy.SetOpt(CURLoption.CURLOPT_URL, strFTPServer +
strFTPFolder);
myEasy.SetOpt(CURLoption.CURLOPT_PORT, strFTPPort);
myEasy.SetOpt(CURLoption.CURLOPT_USERPWD,
strFTPAccount);
myEasy.SetOpt(CURLoption.CURLOPT_FTP_SSL,
CURLftpSSL.CURLFTPSSL_ALL);
myEasy.SetOpt(CURLoption.CURLOPT_FTPSSLAUTH,
CURLftpAuth.CURLFTPAUTH_SSL);
//Get folder list
myEasy.SetOpt(CURLoption.CURLOPT_FTPLISTONLY, true);
CURLcode result = myEasy.Perform();
Thanks in advance,
Received on 2009-05-07