summaryrefslogtreecommitdiff
path: root/Lib/test/ssl_servers.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-12-18 19:00:02 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2011-12-18 19:00:02 +0100
commit7554147d9ca9b6c98b597f757016a81675f96b6d (patch)
treed5211ea253b39d7aba93dc9d4ac9d52343e9dd10 /Lib/test/ssl_servers.py
parentdf02afcd8e16fb06e6e69c2e7d263d3b3fb0f535 (diff)
downloadcpython-7554147d9ca9b6c98b597f757016a81675f96b6d.tar.gz
In the test SSL server, also output the cipher name
Diffstat (limited to 'Lib/test/ssl_servers.py')
-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 77c0542610..77be3814e8 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")