| View previous topic :: View next topic |
| Author |
Message |
bagrous New Member

Joined: 23 Jun 2010 Posts: 1
|
Posted: Wed Jun 23, 2010 11:49 pm Post subject: ftps upload file |
|
|
i have one predefined ftps server. if i tried to upload a file to ftps server, it uploads to 100 percent and the dialog doesn't disappear and it couldn't continue with other files (stucks on first file).
everything works fine if i downgrade to 7.50a
other predefined classic ftp servers work great in 7.55 |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Thu Jun 24, 2010 3:38 am Post subject: |
|
|
Can you send me a log of both the working and hanging transfer to beta at ghisler dot com, please? I don't have any problems uploading to any of the tested ftps servers, so I need your help to find the problem. TC 7.55 should actually handle hanging connections much better than TC 7.50a... _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Sob Power Member

Joined: 19 Jan 2005 Posts: 626
|
Posted: Thu Jun 24, 2010 6:08 am Post subject: |
|
|
I also found one such (non-public) server. So I asked about the used software and it's this exact version of Serv-U:
http://web.hisoftware.cz/sob/tmp/ServUSetup_9-4-0-0.exe (md5 fada205b3e922f9530781fe914bc5f43)
Just install it next-next-finish style (i.e. don't change anything), create domain and user and that's all. Default ssl certificate is included and enabled. Connect, upload some file and transfer should hang at 100%. Tested on clean XP SP3. |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Thu Jun 24, 2010 10:26 am Post subject: |
|
|
I can confirm the bug in Serv-U 9-4-0-0. The error is in the function SSL_shutdown: According to the OpenSSL documentation, programs need to check the reply of SSL_shutdown, and if it's 0, call SSL_shutdown again:
http://www.openssl.org/docs/ssl/SSL_shutdown.html
| Quote: | | It is therefore recommended, to check the return value of SSL_shutdown() and call SSL_shutdown() again, if the bidirectional shutdown is not yet complete (return value of the first call is 0). As the shutdown is not specially handled in the SSLv2 protocol, SSL_shutdown() will succeed on the first call. |
I have done this in TC 7.55, but apparently Serv-U 9-4-0-0 is not sending the shutdown reply, so TC waits forever for the closing of the connection.
Therefore I will have to revert to the behaviour of TC 7.50a which just sends shutdown and then closes the connection. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Sob Power Member

Joined: 19 Jan 2005 Posts: 626
|
Posted: Thu Jun 24, 2010 11:09 am Post subject: |
|
|
| The same page says that for TLS it's ok to only call SSL_shutdown() once, if you're going to close the connection. And ftp data connection can't be reused, so why even bother with second call. ;) |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Thu Jun 24, 2010 2:58 pm Post subject: |
|
|
I wanted to be sure that the connection was properly closed, so no data was lost in the upload. But apparently this isn't possible with some servers. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Sob Power Member

Joined: 19 Jan 2005 Posts: 626
|
Posted: Thu Jun 24, 2010 5:12 pm Post subject: |
|
|
| It does feel a little better and safer when the other side correctly confirms ssl shutdown, no doubt about that. And it's bug in Serv-U and only in this older version. So maybe keeping the current behavior and just extending SpecialFlags in wcx_ftp.ini to enable the old one would be enough? |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Fri Jun 25, 2010 9:42 am Post subject: |
|
|
For the moment I will revert to the behaviour of TC 7.50 (send shutdown and not wait for reply). _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
|