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

Unified Diff: net/tools/testserver/testserver.py

Issue 2205433002: Implement ALPN in tlslite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving nextProtos back to where it was. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/test/spawned_test_server/base_test_server.cc ('k') | third_party/tlslite/README.chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/testserver/testserver.py
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 14c5abcca049166d8a64a04c2f01271ce9cb6722..e8241cb6e389643f6c7440722467a609c3e85a17 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -161,8 +161,8 @@ class HTTPSServer(tlslite.api.TLSSocketServerMixIn,
def __init__(self, server_address, request_hander_class, pem_cert_and_key,
ssl_client_auth, ssl_client_cas, ssl_client_cert_types,
- ssl_bulk_ciphers, ssl_key_exchanges, npn_protocols,
- record_resume_info, tls_intolerant,
+ ssl_bulk_ciphers, ssl_key_exchanges, alpn_protocols,
+ npn_protocols, record_resume_info, tls_intolerant,
tls_intolerance_type, signed_cert_timestamps,
fallback_scsv_enabled, ocsp_response,
alert_after_handshake, disable_channel_id, disable_ems,
@@ -215,6 +215,7 @@ class HTTPSServer(tlslite.api.TLSSocketServerMixIn,
self.ssl_handshake_settings.enableExtendedMasterSecret = False
self.ssl_handshake_settings.supportedTokenBindingParams = \
token_binding_params
+ self.ssl_handshake_settings.alpnProtos=alpn_protocols;
if record_resume_info:
# If record_resume_info is true then we'll replace the session cache with
@@ -1992,6 +1993,7 @@ class ServerRunner(testserver_base.TestServerRunner):
self.options.ssl_client_cert_type,
self.options.ssl_bulk_cipher,
self.options.ssl_key_exchange,
+ self.options.alpn_protocols,
self.options.npn_protocols,
self.options.record_resume,
self.options.tls_intolerant,
@@ -2226,9 +2228,13 @@ class ServerRunner(testserver_base.TestServerRunner):
'will be used. This option may appear '
'multiple times, indicating multiple '
'algorithms should be enabled.');
- # TODO(davidben): Add ALPN support to tlslite.
+ self.option_parser.add_option('--alpn-protocols', action='append',
+ help='Specify the list of ALPN protocols. '
+ 'The server will not send an ALPN response '
+ 'if this list does not overlap with the '
+ 'list of protocols the client advertises.')
self.option_parser.add_option('--npn-protocols', action='append',
- help='Specify the list of protocols sent in'
+ help='Specify the list of protocols sent in '
'an NPN response. The server will not'
'support NPN if the list is empty.')
self.option_parser.add_option('--file-root-url', default='/files/',
« no previous file with comments | « net/test/spawned_test_server/base_test_server.cc ('k') | third_party/tlslite/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698