Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tlslite/tlsconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3009,6 +3009,7 @@ def _serverTLS13Handshake(self, settings, clientHello, cipherSuite,
clientHello.session_id,
cipherSuite, extensions=sh_extensions)

self.sock.buffer_writes = True
msgs = []
msgs.append(serverHello)
if not self._ccs_sent and clientHello.session_id:
Expand Down Expand Up @@ -3195,6 +3196,9 @@ def _serverTLS13Handshake(self, settings, clientHello, cipherSuite,
for result in self._queue_flush():
yield result

self.sock.flush()
self.sock.buffer_writes = False

self._changeReadState()

# Master secret
Expand Down
3 changes: 0 additions & 3 deletions tlslite/tlsrecordlayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,14 +952,11 @@ def _sendError(self, alertDescription, errorStr=None):

def _sendMsgs(self, msgs):
# send messages together in a single TCP write
self.sock.buffer_writes = True
randomizeFirstBlock = True
for msg in msgs:
for result in self._sendMsg(msg, randomizeFirstBlock):
yield result
randomizeFirstBlock = True
self.sock.flush()
self.sock.buffer_writes = False

def _sendMsg(self, msg, randomizeFirstBlock=True, update_hashes=True):
"""Fragment and send message through socket"""
Expand Down