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

Unified Diff: third_party/tlslite/test/httpsserver.py

Issue 210323002: Update tlslite to 0.4.6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rietveld, please behave 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 side-by-side diff with in-line comments
Download patch
Index: third_party/tlslite/test/httpsserver.py
diff --git a/third_party/tlslite/test/httpsserver.py b/third_party/tlslite/test/httpsserver.py
deleted file mode 100644
index 087a979ba5b50cd059950d0c7274b9158355e3c2..0000000000000000000000000000000000000000
--- a/third_party/tlslite/test/httpsserver.py
+++ /dev/null
@@ -1,29 +0,0 @@
-from SocketServer import *
-from BaseHTTPServer import *
-from SimpleHTTPServer import *
-from tlslite.api import *
-
-s = open("./serverX509Cert.pem").read()
-x509 = X509()
-x509.parse(s)
-certChain = X509CertChain([x509])
-
-s = open("./serverX509Key.pem").read()
-privateKey = parsePEMKey(s, private=True)
-
-sessionCache = SessionCache()
-
-class MyHTTPServer(ThreadingMixIn, TLSSocketServerMixIn, HTTPServer):
- def handshake(self, tlsConnection):
- try:
- tlsConnection.handshakeServer(certChain=certChain,
- privateKey=privateKey,
- sessionCache=sessionCache)
- tlsConnection.ignoreAbruptClose = True
- return True
- except TLSError, error:
- print "Handshake failure:", str(error)
- return False
-
-httpd = MyHTTPServer(('localhost', 443), SimpleHTTPRequestHandler)
-httpd.serve_forever()

Powered by Google App Engine
This is Rietveld 408576698