Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15
lftp.10482
fix-zero-byte-file-upload-via-ssl.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-zero-byte-file-upload-via-ssl.patch of Package lftp.10482
From b934dbba0cb3a2b367549d0e17131538b90acbc5 Mon Sep 17 00:00:00 2001 From: "Alexander V. Lukyanov" <lavv17f@gmail.com> Date: Tue, 20 Feb 2018 21:38:30 +0300 Subject: [PATCH] BufferSSL: handshake ssl even if we have no data to write (fix #420) --- src/buffer_ssl.cc | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/buffer_ssl.cc b/src/buffer_ssl.cc index 5f466bd2..9e701c22 100644 --- a/src/buffer_ssl.cc +++ b/src/buffer_ssl.cc @@ -34,13 +34,25 @@ int IOBufferSSL::Do() if(Done() || Error()) return m; - if(mode==PUT && Size()==0 && ssl->handshake_done && !eof) - return m; - - // cannot use want_mask before trying to read/write, since ssl can be shared - if(!ssl->handshake_done || eof || Ready(ssl->fd,dir_mask())) - m|=super::Do(); - + if(mode==PUT && Size()==0) + { + // nothing to write, but may need to do handshake + if(!ssl->handshake_done) + { + if(Put_LL("",0)<0) + return MOVED; + if(ssl->handshake_done && eof) + ssl->shutdown(); + } + if(ssl->handshake_done && !eof) + return m; + } + else + { + // cannot use want_mask before trying to read/write, since ssl can be shared + if(!ssl->handshake_done || eof || Ready(ssl->fd,dir_mask())) + m|=super::Do(); + } Block(ssl->fd,block_mask()); return m; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor