Ticket #2673 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Twisted #686 breaks Juice.startTLS sometimes

Reported by: pjd Assigned to: pjd
Priority: normal Milestone:
Component: Epsilon Severity: normal
Keywords: Cc:
Estimated Completion (YYYY/MM/DD): Branch:
Author:

Description

Twisted #686 changes the behavior of Connection.startTLS to no longer return only on success.

This non-deterministically breaks most of the tests in vertex.test.test_q2q, with secondary AttributeErrors resulting from the following assertion failing:

  • Epsilon/epsilon/juice.py

    old new  
    852852            self.hostCertificate = certificate 
    853853            self._justStartedTLS = True 
    854854            self.transport.startTLS(certificate.options(*verifyAuthorities)) 
     855            assert self.transport.TLS 
    855856            # Remember that mutable list that we were just talking about?  Here 
    856857            # it is.  sslverify.py takes care of populating this list as 
    857858            # necessary. --glyph 

This happens even in cases that used to succeed, due to Connection.startTLS no longer attempting an eager inline buffer flush.

The most apparent fix is for Juice.startTLS (and its callers) to wait for Connection.startTLS to complete; i'm not sure how to accomplish this other than defining startTLS to return a Deferred.

For Vertex, this could perhaps be side-stepped by #2580 (AMP).

Change History

(follow-up: ↓ 2 ) 08/10/08 09:47:58 changed by exarkun

#2670 deletes all the code in Juice.startTLS which follows the call to the transport's startTLS method. This should remove the requirement that TLS actually be started synchronously by the transport's startTLS method.

(in reply to: ↑ 1 ) 08/11/08 17:32:26 changed by pjd

  • status changed from new to closed.
  • resolution set to fixed.

Looks like #2670 resolves it, thanks.

jethro@divmod.org