Strange problem with FTP/SSL

Giganews Newsgroups
Subject: Strange problem with FTP/SSL
Posted by:  Cary Moore (cary.moo…@XXsherbrookesoftwareXX.co.uk)
Date: Sun, 22 Aug 2010

Tesing FTP SSL, test application works on XP and Windows 7 but fails on
Windows Server 2008 and 2008 R2.

Example log, connects OK, negotiates SSL, fails when getting a file
list (NLIST)

FTP<<< 220 ***.***.*** X2 WS_FTP Server 7.1(90775000)
FTP>>> HOST ***.***.***
FTP<<< 200 Command HOST succeed
FTP>>> AUTH SSL
FTP<<< 234 SSL enabled and waiting for negotiation
FTP>>> USER *********
FTP<<< 331 Enter password
FTP>>> PASS *********
FTP<<< 230-User logged in
FTP<<<  *** Valkommen till ********* ***
FTP<<<
FTP<<< 230 User logged in
FTP>>> FEAT
FTP<<< 211-Extensions supported    SIZE    XMD5    XSHA1    XSHA256
XSHA512    XQUOTA    LANG EN, ES, FR, GE    MDTM    MLST
size*;type*;perm*;create*;modify*;    REST STREAM    TVFS    UTF8
AUTH SSL;TLS-P;    PBSZ    PROT C;P;211 end
FTP>>> OPTS UTF8 ON
FTP<<< 200 Command OPTS succeed
FTP>>> TYPE I
FTP<<< 200 Transfer mode set to BINARY
FTP>>> SYST
FTP<<< 215 UNIX
FTP>>> TYPE I
FTP<<< 200 Transfer mode set to BINARY
FTP>>> TYPE I
FTP<<< 200 Transfer mode set to BINARY
FTP>>> PBSZ 0
FTP<<< 200 PBSZ=0
FTP>>> PROT P
FTP<<< 200 PRIVATE data channel protection level set
FTP>>> PASV
FTP<<< 227 Entering Passive Mode (*,*,*,*,20,66).
FTP>>> NLST
FTP<<< 125 Transferring directory
After 60 seconds.....
FTP<<< 426 Transfer failed

On the ioHandler VerifyMode = [sslvrfPeer] and the OnVerifyPeer event
pops up a message box.

On Windows XP and 7 the verify box displays 3 times at the login stage
and then again 3 times when requesting the file list.

On Windows 2008 the pop up only displays at login.

Passive connections to a non SSL server works fine in all environments,
unforunately the target environment is Windows 2008 (Windows Service
periodically copying files from a FTP server and SSL is a must)

To make matters worse, the application was running fine on Win2008 for
a couple of weeks, it only failed when the PC was rebooted and now it
just refuses to function.

Background Information
Delphi 2010
Indy 10.5.7.0
Latest OpenSSL installed (0.9.8o)
VC++ 2008 Redistributable installed

Any help would be greatly appreciated

Cary.

Replies