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

Side by Side Diff: third_party/tlslite/tlslite/integration/tlssocketservermixin.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 + SocketServer.""" 1 """TLS Lite + SocketServer."""
2 2
3 from tlslite.TLSConnection import TLSConnection 3 from tlslite.tlsconnection import TLSConnection
4 4
5 class TLSSocketServerMixIn: 5 class TLSSocketServerMixIn:
6 """ 6 """
7 This class can be mixed in with any L{SocketServer.TCPServer} to 7 This class can be mixed in with any L{SocketServer.TCPServer} to
8 add TLS support. 8 add TLS support.
9 9
10 To use this class, define a new class that inherits from it and 10 To use this class, define a new class that inherits from it and
11 some L{SocketServer.TCPServer} (with the mix-in first). Then 11 some L{SocketServer.TCPServer} (with the mix-in first). Then
12 implement the handshake() method, doing some sort of server 12 implement the handshake() method, doing some sort of server
13 handshake on the connection argument. If the handshake method 13 handshake on the connection argument. If the handshake method
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 def finish_request(self, sock, client_address): 50 def finish_request(self, sock, client_address):
51 tlsConnection = TLSConnection(sock) 51 tlsConnection = TLSConnection(sock)
52 if self.handshake(tlsConnection) == True: 52 if self.handshake(tlsConnection) == True:
53 self.RequestHandlerClass(tlsConnection, client_address, self) 53 self.RequestHandlerClass(tlsConnection, client_address, self)
54 tlsConnection.close() 54 tlsConnection.close()
55 55
56 #Implement this method to do some form of handshaking. Return True 56 #Implement this method to do some form of handshaking. Return True
57 #if the handshake finishes properly and the request is authorized. 57 #if the handshake finishes properly and the request is authorized.
58 def handshake(self, tlsConnection): 58 def handshake(self, tlsConnection):
59 raise NotImplementedError() 59 raise NotImplementedError()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698