[Python-checkins] cpython: In the test SSL server, also output the cipher name

antoine.pitrou python-checkins at python.org
Sun Dec 18 19:04:09 CET 2011


http://hg.python.org/cpython/rev/8335e6c084f6
changeset: 74040:8335e6c084f6
parent: 74032:fbd797fc3809
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Dec 18 19:00:02 2011 +0100
summary:
 In the test SSL server, also output the cipher name
files:
 Lib/test/ssl_servers.py | 6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Lib/test/ssl_servers.py b/Lib/test/ssl_servers.py
--- a/Lib/test/ssl_servers.py
+++ b/Lib/test/ssl_servers.py
@@ -94,7 +94,11 @@
 """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")
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /