[CalendarServer-changes] [15385] PySecureTransport/trunk/OpenSSL/SSL.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Dec 14 09:43:36 PST 2015


Revision: 15385
          http://trac.calendarserver.org//changeset/15385
Author:   cdaboo at apple.com
Date:     2015-12-14 09:43:36 -0800 (Mon, 14 Dec 2015)
Log Message:
-----------
Treat missing context during handshake as a protocol read error rather than a fatal error.

Modified Paths:
--------------
    PySecureTransport/trunk/OpenSSL/SSL.py

Modified: PySecureTransport/trunk/OpenSSL/SSL.py
===================================================================
--- PySecureTransport/trunk/OpenSSL/SSL.py	2015-12-14 16:57:48 UTC (rev 15384)
+++ PySecureTransport/trunk/OpenSSL/SSL.py	2015-12-14 17:43:36 UTC (rev 15385)
@@ -396,7 +396,9 @@
         handshake data exchange to take place. So this will likely get errSSLWouldBlock several times.
         """
         if self.ctx is None:
-            raise Error("No context")
+            # Just treat this as a failure to read data as it is possible the connection
+            # got closed right before, or during, the handshake.
+            raise WantReadError
         self._in_handshake = True
         err = security.SSLHandshake(self.ctx)
         if err == 0:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20151214/f92f897c/attachment.html>


More information about the calendarserver-changes mailing list