From bf0c175b9d0eb962def461ffcf12847a2cf12adc Mon Sep 17 00:00:00 2001 From: lxnay Date: Sun, 31 Aug 2008 11:42:49 +0000 Subject: [PATCH] Entropy: testing SSL on big transfers git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2362 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropy.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/libraries/entropy.py b/libraries/entropy.py index 051625657..4a2d71823 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -12841,14 +12841,14 @@ class SocketHostInterface: if len(ready_to_read) == 1 and ready_to_read[0] == self.request: self.timed_out = False - def check_ssl_pending(): - if self.ssl: - if self.request.pending() == 0: - return True - return False try: + data = self.request.recv(1024) + if self.ssl: + while self.request.pending(): + data += self.request.recv(1024) + if self.data_counter == None: if data == '': # client wants to close return True @@ -12872,9 +12872,6 @@ class SocketHostInterface: self.data_counter -= len(data) self.buffered_data += data - do_quit = check_ssl_pending() - if do_quit: return False - while self.data_counter > 0: x = self.request.recv(1024) xlen = len(x) @@ -12883,9 +12880,6 @@ class SocketHostInterface: if not xlen: break - do_quit = check_ssl_pending() - if do_quit: return False - self.data_counter = None except ValueError: #self.entropyTools.printTraceback()