On Tue, Nov 22, 2005 at 02:56:19PM +0300, Alexander V. Lukyanov wrote:
> > lftp-3.3.[34] blocks at end of SSL transfer
> > 
> > https://bugs.gentoo.org/show_bug.cgi?id=112487
> 
> I confirm this one. It only happens with openssl, not with gnutls. I'll
> investigate it.

Here is a patch.

-- 
   Alexander.
Index: lftp_ssl.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/lftp_ssl.cc,v
retrieving revision 1.24
diff -u -p -r1.24 lftp_ssl.cc
--- lftp_ssl.cc 8 Nov 2005 07:21:18 -0000       1.24
+++ lftp_ssl.cc 22 Nov 2005 12:07:34 -0000
@@ -851,7 +851,7 @@ bool lftp_ssl_openssl::check_fatal(int r
 
 int lftp_ssl_openssl::do_handshake()
 {
-   if(SSL_is_init_finished(ssl))
+   if(handshake_done)
       return DONE;
    if(handshake_mode==SERVER)
    {
@@ -873,6 +873,7 @@ int lftp_ssl_openssl::do_handshake()
         return ERROR;
       }
    }
+   handshake_done=true;
    return DONE;
 }
 int lftp_ssl_openssl::read(char *buf,int size)

Reply via email to