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

Side by Side Diff: third_party/twisted_8_1/twisted/test/ssl_helpers.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 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
(Empty)
1
2 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
3 # See LICENSE for details.
4
5
6 from twisted.internet import ssl
7 from twisted.python.util import sibpath
8
9 from OpenSSL import SSL
10
11 class ClientTLSContext(ssl.ClientContextFactory):
12 isClient = 1
13 def getContext(self):
14 return SSL.Context(SSL.TLSv1_METHOD)
15
16 class ServerTLSContext:
17 isClient = 0
18
19 def __init__(self, filename = sibpath(__file__, 'server.pem')):
20 self.filename = filename
21
22 def getContext(self):
23 ctx = SSL.Context(SSL.TLSv1_METHOD)
24 ctx.use_certificate_file(self.filename)
25 ctx.use_privatekey_file(self.filename)
26 return ctx
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/test/server.pem ('k') | third_party/twisted_8_1/twisted/test/stdio_test_consumer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698