[Python-checkins] cpython: Add a --ciphers option to Lib/test/ssl_servers.py

antoine.pitrou python-checkins at python.org
Thu Apr 17 12:30:20 CEST 2014


http://hg.python.org/cpython/rev/517de1983677
changeset:   90380:517de1983677
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Thu Apr 17 12:30:14 2014 +0200
summary:
  Add a --ciphers option to Lib/test/ssl_servers.py

files:
  Lib/test/ssl_servers.py |  4 ++++
  1 files changed, 4 insertions(+), 0 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
@@ -182,6 +182,8 @@
     parser.add_argument('--curve-name', dest='curve_name', type=str,
                         action='store',
                         help='curve name for EC-based Diffie-Hellman')
+    parser.add_argument('--ciphers', dest='ciphers', type=str,
+                        help='allowed cipher list')
     parser.add_argument('--dh', dest='dh_file', type=str, action='store',
                         help='PEM file containing DH parameters')
     args = parser.parse_args()
@@ -198,6 +200,8 @@
         context.set_ecdh_curve(args.curve_name)
     if args.dh_file:
         context.load_dh_params(args.dh_file)
+    if args.ciphers:
+        context.set_ciphers(args.ciphers)
 
     server = HTTPSServer(("", args.port), handler_class, context)
     if args.verbose:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list