def pretendToVerify(self, other, tpt): # Set the transport problems list here? disconnections? # hmmmmm... need some negative path tests. if not self.obj.iosimVerify(other.obj): tpt.disconnectReason = NativeOpenSSLError() tpt.loseConnection()
def reportDisconnect(self): if self.tls is not None: # We were in the middle of negotiating! Must have been a TLS problem. err = NativeOpenSSLError() else: err = self.disconnectReason self.protocol.connectionLost(Failure(err))