BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP over TLS/SSL (one more time)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Bert
Guest





PostPosted: Tue May 08, 2007 7:44 pm    Post subject: FTP over TLS/SSL (one more time) Reply with quote



hopefully the last;-))

Now I got a server, that let me establish a secure connection.
FTP over TLS
I've tested it with a FTP application named FileZilla.

The data I've used:

Host: MyHostName.de
Port: 21
type of server: FTP over TLS(explicit encoding)
User: Me
Pass: MyPass

and everthing works fine.

Now I've tried to set up a connection using Indy.


FTPCtrl.Host := MyHostName.de
FTPCtrl.Username := Me;
FTPCtrl.Password := MyPass;
FTPCtrl.UseTLS := utUseExplicitTLS;
FTPCtrl.Port := 21;
FTPCtrl.IOHandler := IdSSLIOHandlerSocketOpenSSL1;
SSLOptions.Method := sslvSSLv3;
FTPCtrl.Connect;

And the connection seems to be established and everything looks fine.
---------- logging ---------------------
SSLIO-Status: Resolving hostname xxxxxxxxxxx.
[08.05.2007 16:34:34] - SSLIO-Status: Connecting to xx.xxx.xxx.xxx.
[08.05.2007 16:34:34] - Connected.
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "before/connect
initialization"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "before/connect
initialization"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write client
hello A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
hello A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
certificate A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server key
exchange A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
certificate request A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
done A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write client
certificate A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write client
key exchange A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write change
cipher spec A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write finished
A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 flush data"
[08.05.2007 16:34:35] - SSLIO-StatusINFO: SSL status: "SSLv3 read finished
A"
[08.05.2007 16:34:35] - SSLIO-StatusINFO: SSL status: "SSL negotiation
finished successfully"
[08.05.2007 16:34:35] - SSLIO-StatusINFO: SSL status: "SSL negotiation
finished successfully"
[08.05.2007 16:34:35] - SSLIO-StatusINFO: Cipher: name =
EDH-RSA-DES-CBC3-SHA; description = EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH
Au=RSA Enc=3DES(168) Mac=SHA1
; bits = 168; version = TLSv1/SSLv3;
[08.05.2007 16:34:35] - Connection established
---------- logging ---------------------


But if I call FTPCtrl.Put() the put command fails with:
"Illegal PORT Command"
The same occurs if I call FTPCtrl.List()

Whats wrong?
What i have to do to solve this problem?

Thanks in advanced
Bert
Back to top
Bert
Guest





PostPosted: Wed May 09, 2007 3:39 pm    Post subject: SOLVED - FTP over TLS/SSL (one more time) Reply with quote



Seems to be a problem with some server.
setting the
FTPCtrl.Passive := True;
solved the problem.
No "Illegal PORT Command" occurs and everything works fine.

Bert


"Bert" <BEndler (AT) dictanet (DOT) com> schrieb im Newsbeitrag
news:46408ce2$1 (AT) newsgroups (DOT) borland.com...
Quote:
hopefully the last;-))

Now I got a server, that let me establish a secure connection.
FTP over TLS
I've tested it with a FTP application named FileZilla.

The data I've used:

Host: MyHostName.de
Port: 21
type of server: FTP over TLS(explicit encoding)
User: Me
Pass: MyPass

and everthing works fine.

Now I've tried to set up a connection using Indy.


FTPCtrl.Host := MyHostName.de
FTPCtrl.Username := Me;
FTPCtrl.Password := MyPass;
FTPCtrl.UseTLS := utUseExplicitTLS;
FTPCtrl.Port := 21;
FTPCtrl.IOHandler := IdSSLIOHandlerSocketOpenSSL1;
SSLOptions.Method := sslvSSLv3;
FTPCtrl.Connect;

And the connection seems to be established and everything looks fine.
---------- logging ---------------------
SSLIO-Status: Resolving hostname xxxxxxxxxxx.
[08.05.2007 16:34:34] - SSLIO-Status: Connecting to xx.xxx.xxx.xxx.
[08.05.2007 16:34:34] - Connected.
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "before/connect
initialization"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "before/connect
initialization"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write client
hello A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
hello A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
certificate A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
key exchange A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
certificate request A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 read server
done A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write client
certificate A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write client
key exchange A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write change
cipher spec A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 write
finished A"
[08.05.2007 16:34:34] - SSLIO-StatusINFO: SSL status: "SSLv3 flush data"
[08.05.2007 16:34:35] - SSLIO-StatusINFO: SSL status: "SSLv3 read finished
A"
[08.05.2007 16:34:35] - SSLIO-StatusINFO: SSL status: "SSL negotiation
finished successfully"
[08.05.2007 16:34:35] - SSLIO-StatusINFO: SSL status: "SSL negotiation
finished successfully"
[08.05.2007 16:34:35] - SSLIO-StatusINFO: Cipher: name =
EDH-RSA-DES-CBC3-SHA; description = EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH
Au=RSA Enc=3DES(168) Mac=SHA1
; bits = 168; version = TLSv1/SSLv3;
[08.05.2007 16:34:35] - Connection established
---------- logging ---------------------


But if I call FTPCtrl.Put() the put command fails with:
"Illegal PORT Command"
The same occurs if I call FTPCtrl.List()

Whats wrong?
What i have to do to solve this problem?

Thanks in advanced
Bert


Back to top
Tony Caduto
Guest





PostPosted: Sat May 12, 2007 5:43 pm    Post subject: Re: FTP over TLS/SSL (one more time) Reply with quote



you should consider using Synapse instead of indy for you FTP needs.
Synapse has a nice FTP client class with top notch support for SSL.
check it out at: http://synapse.ararat.cz/

I had nothing but problems with Indy and when I switched to Synapse
things worked.


--
Tony Caduto
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql and MySQL
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.