summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-12-18 18:00:02 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-12-18 18:00:02 (GMT)
commitfb0901c96898148bcd47aad2aa3ae59281af3b5a (patch)
tree46de8cd5058d589a256fd2a8d718f4f30a30f29b
parent6099a032028e7d93d40741f1cda792407a635dc7 (diff)
downloadcpython-fb0901c96898148bcd47aad2aa3ae59281af3b5a.zip
cpython-fb0901c96898148bcd47aad2aa3ae59281af3b5a.tar.gz
cpython-fb0901c96898148bcd47aad2aa3ae59281af3b5a.tar.bz2
In the test SSL server, also output the cipher name
-rw-r--r--Lib/test/ssl_servers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/ssl_servers.py b/Lib/test/ssl_servers.py
index 77c0542..77be381 100644
--- a/Lib/test/ssl_servers.py
+++ b/Lib/test/ssl_servers.py
@@ -94,7 +94,11 @@ class StatsRequestHandler(BaseHTTPRequestHandler):
"""Serve a GET request."""
sock = self.rfile.raw._sock
context = sock.context
- body = pprint.pformat(context.session_stats())
+ stats = {
+ 'session_cache': context.session_stats(),
+ 'cipher': sock.cipher(),
+ }
+ body = pprint.pformat(stats)
body = body.encode('utf-8')
self.send_response(200)
self.send_header("Content-type", "text/plain; charset=utf-8")