diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-04-17 10:30:14 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-04-17 10:30:14 (GMT) |
commit | 617c4dc30427041984a21b3ca3873a585ca2cb1a (patch) | |
tree | 360d33f557414839bfeee22033e5e7c08bd27feb /Lib/test/ssl_servers.py | |
parent | 05649f39ecee943a50670a28ef4e9758c98add98 (diff) | |
download | cpython-617c4dc30427041984a21b3ca3873a585ca2cb1a.zip cpython-617c4dc30427041984a21b3ca3873a585ca2cb1a.tar.gz cpython-617c4dc30427041984a21b3ca3873a585ca2cb1a.tar.bz2 |
Add a --ciphers option to Lib/test/ssl_servers.py
Diffstat (limited to 'Lib/test/ssl_servers.py')
-rw-r--r-- | 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 index e6ae7c4..f9d30cf 100644 --- a/Lib/test/ssl_servers.py +++ b/Lib/test/ssl_servers.py @@ -182,6 +182,8 @@ if __name__ == "__main__": 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 @@ if __name__ == "__main__": 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: |