Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1012)

Side by Side Diff: third_party/tlslite/tlslite/integration/TLSTwistedProtocolWrapper.py

Issue 211173006: Perform tlslite 0.3.8 -> 0.4.6 renames ahead of time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drop the -B Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 """TLS Lite + Twisted.""" 1 """TLS Lite + Twisted."""
2 2
3 from twisted.protocols.policies import ProtocolWrapper, WrappingFactory 3 from twisted.protocols.policies import ProtocolWrapper, WrappingFactory
4 from twisted.python.failure import Failure 4 from twisted.python.failure import Failure
5 5
6 from AsyncStateMachine import AsyncStateMachine 6 from asyncstatemachine import AsyncStateMachine
7 from tlslite.TLSConnection import TLSConnection 7 from tlslite.tlsconnection import TLSConnection
8 from tlslite.errors import * 8 from tlslite.errors import *
9 9
10 import socket 10 import socket
11 import errno 11 import errno
12 12
13 13
14 #The TLSConnection is created around a "fake socket" that 14 #The TLSConnection is created around a "fake socket" that
15 #plugs it into the underlying Twisted transport 15 #plugs it into the underlying Twisted transport
16 class _FakeSocket: 16 class _FakeSocket:
17 def __init__(self, wrapper): 17 def __init__(self, wrapper):
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 #Because of the FakeSocket, write operations are guaranteed to 186 #Because of the FakeSocket, write operations are guaranteed to
187 #terminate immediately. 187 #terminate immediately.
188 AsyncStateMachine.setWriteOp(self, data) 188 AsyncStateMachine.setWriteOp(self, data)
189 189
190 def writeSequence(self, seq): 190 def writeSequence(self, seq):
191 if not self.tlsStarted: 191 if not self.tlsStarted:
192 ProtocolWrapper.writeSequence(self, seq) 192 ProtocolWrapper.writeSequence(self, seq)
193 else: 193 else:
194 #Because of the FakeSocket, write operations are guaranteed to 194 #Because of the FakeSocket, write operations are guaranteed to
195 #terminate immediately. 195 #terminate immediately.
196 AsyncStateMachine.setWriteOp(self, "".join(seq)) 196 AsyncStateMachine.setWriteOp(self, "".join(seq))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698