Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: net/tools/testserver/testserver.py

Issue 1056153002: Reland 'Require ECDHE for False Start.' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/test/spawned_test_server/base_test_server.cc ('k') | third_party/boringssl/boringssl.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """This is a simple HTTP/FTP/TCP/UDP/BASIC_AUTH_PROXY/WEBSOCKET server used for 6 """This is a simple HTTP/FTP/TCP/UDP/BASIC_AUTH_PROXY/WEBSOCKET server used for
7 testing Chrome. 7 testing Chrome.
8 8
9 It supports several test URLs, as specified by the handlers in TestPageHandler. 9 It supports several test URLs, as specified by the handlers in TestPageHandler.
10 By default, it listens on an ephemeral port and sends the port number back to 10 By default, it listens on an ephemeral port and sends the port number back to
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 'algorithm(s) that will be accepted by the ' 2251 'algorithm(s) that will be accepted by the '
2252 'SSL server. Valid values are "aes128gcm", ' 2252 'SSL server. Valid values are "aes128gcm", '
2253 '"aes256", "aes128", "3des", "rc4". If ' 2253 '"aes256", "aes128", "3des", "rc4". If '
2254 'omitted, all algorithms will be used. This ' 2254 'omitted, all algorithms will be used. This '
2255 'option may appear multiple times, ' 2255 'option may appear multiple times, '
2256 'indicating multiple algorithms should be ' 2256 'indicating multiple algorithms should be '
2257 'enabled.'); 2257 'enabled.');
2258 self.option_parser.add_option('--ssl-key-exchange', action='append', 2258 self.option_parser.add_option('--ssl-key-exchange', action='append',
2259 help='Specify the key exchange algorithm(s)' 2259 help='Specify the key exchange algorithm(s)'
2260 'that will be accepted by the SSL server. ' 2260 'that will be accepted by the SSL server. '
2261 'Valid values are "rsa", "dhe_rsa". If ' 2261 'Valid values are "rsa", "dhe_rsa", '
2262 'omitted, all algorithms will be used. This ' 2262 '"ecdhe_rsa". If omitted, all algorithms '
2263 'option may appear multiple times, ' 2263 'will be used. This option may appear '
2264 'indicating multiple algorithms should be ' 2264 'multiple times, indicating multiple '
2265 'enabled.'); 2265 'algorithms should be enabled.');
2266 # TODO(davidben): Add ALPN support to tlslite. 2266 # TODO(davidben): Add ALPN support to tlslite.
2267 self.option_parser.add_option('--enable-npn', dest='enable_npn', 2267 self.option_parser.add_option('--enable-npn', dest='enable_npn',
2268 default=False, const=True, 2268 default=False, const=True,
2269 action='store_const', 2269 action='store_const',
2270 help='Enable server support for the NPN ' 2270 help='Enable server support for the NPN '
2271 'extension. The server will advertise ' 2271 'extension. The server will advertise '
2272 'support for exactly one protocol, http/1.1') 2272 'support for exactly one protocol, http/1.1')
2273 self.option_parser.add_option('--file-root-url', default='/files/', 2273 self.option_parser.add_option('--file-root-url', default='/files/',
2274 help='Specify a root URL for files served.') 2274 help='Specify a root URL for files served.')
2275 # TODO(ricea): Generalize this to support basic auth for HTTP too. 2275 # TODO(ricea): Generalize this to support basic auth for HTTP too.
2276 self.option_parser.add_option('--ws-basic-auth', action='store_true', 2276 self.option_parser.add_option('--ws-basic-auth', action='store_true',
2277 dest='ws_basic_auth', 2277 dest='ws_basic_auth',
2278 help='Enable basic-auth for WebSocket') 2278 help='Enable basic-auth for WebSocket')
2279 self.option_parser.add_option('--ocsp-server-unavailable', 2279 self.option_parser.add_option('--ocsp-server-unavailable',
2280 dest='ocsp_server_unavailable', 2280 dest='ocsp_server_unavailable',
2281 default=False, action='store_true', 2281 default=False, action='store_true',
2282 help='If set, the OCSP server will return ' 2282 help='If set, the OCSP server will return '
2283 'a tryLater status rather than the actual ' 2283 'a tryLater status rather than the actual '
2284 'OCSP response.') 2284 'OCSP response.')
2285 self.option_parser.add_option('--alert-after-handshake', 2285 self.option_parser.add_option('--alert-after-handshake',
2286 dest='alert_after_handshake', 2286 dest='alert_after_handshake',
2287 default=False, action='store_true', 2287 default=False, action='store_true',
2288 help='If set, the server will send a fatal ' 2288 help='If set, the server will send a fatal '
2289 'alert immediately after the handshake.') 2289 'alert immediately after the handshake.')
2290 2290
2291 2291
2292 if __name__ == '__main__': 2292 if __name__ == '__main__':
2293 sys.exit(ServerRunner().main()) 2293 sys.exit(ServerRunner().main())
OLDNEW
« no previous file with comments | « net/test/spawned_test_server/base_test_server.cc ('k') | third_party/boringssl/boringssl.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698