On Wed, 17 Sep 2014 02:55:36 -0400 (EDT), Alexander Lukyanov wrote:
> 
> Here is an additional patch to wait for QUIT reply after "close" command.

OK, now the problem is fixed.   But I'm now getting an error message
that I wasn't getting before.  The last four lines of debug output are
as follows:

---> QUIT
<--- 221 Goodbye.
**** gnutls_record_recv: The TLS connection was non-properly terminated.
---- Closing control socket

Since this error occurs on a receive, I suspect that this is a server bug
which has existed all along, but which has now been exposed, now that the
client is behaving properly.  Still, it might be a good idea to output a
little more information (return codes, reason codes, whatever) about this
error that might help confirm the error as a server bug.

RFC 2246 (TLS 1.0) states, in section 7.2.1 (Closure Alerts), "Each party
is required to send a close_notify alert before closing the write side of
the connection."  RFC 4346 (TLS 1.1) adds an additional qualification to
this rule, but otherwise confirms the rule: "Unless some other fatal alert
has been transmitted, each party is required to send a close_notify alert
before closing the write side of the connection."  RFC 5246 (TLS 1.2)
retains the wording of RFC 4346.  I suspect that the server is closing the
write side of the control connection on its end without sending the
close_notify alert first, and I suspect that that is what is causing the
gnutls_record_recv error on the client.  The server in question is vsftpd.
Of course, to avoid errors on the server, lftp is sending a close_notify
alert before closing the write side of the connection on its end, right?

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-
_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to