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

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

Issue 1133863004: Prune some remnants of DSA client certificate support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test server Created 5 years, 7 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
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 if ssl_client_auth: 182 if ssl_client_auth:
183 for ca_file in ssl_client_cas: 183 for ca_file in ssl_client_cas:
184 s = open(ca_file).read() 184 s = open(ca_file).read()
185 x509 = tlslite.api.X509() 185 x509 = tlslite.api.X509()
186 x509.parse(s) 186 x509.parse(s)
187 self.ssl_client_cas.append(x509.subject) 187 self.ssl_client_cas.append(x509.subject)
188 188
189 for cert_type in ssl_client_cert_types: 189 for cert_type in ssl_client_cert_types:
190 self.ssl_client_cert_types.append({ 190 self.ssl_client_cert_types.append({
191 "rsa_sign": tlslite.api.ClientCertificateType.rsa_sign, 191 "rsa_sign": tlslite.api.ClientCertificateType.rsa_sign,
192 "dss_sign": tlslite.api.ClientCertificateType.dss_sign,
193 "ecdsa_sign": tlslite.api.ClientCertificateType.ecdsa_sign, 192 "ecdsa_sign": tlslite.api.ClientCertificateType.ecdsa_sign,
194 }[cert_type]) 193 }[cert_type])
195 194
196 self.ssl_handshake_settings = tlslite.api.HandshakeSettings() 195 self.ssl_handshake_settings = tlslite.api.HandshakeSettings()
197 # Enable SSLv3 for testing purposes. 196 # Enable SSLv3 for testing purposes.
198 self.ssl_handshake_settings.minVersion = (3, 0) 197 self.ssl_handshake_settings.minVersion = (3, 0)
199 if ssl_bulk_ciphers is not None: 198 if ssl_bulk_ciphers is not None:
200 self.ssl_handshake_settings.cipherNames = ssl_bulk_ciphers 199 self.ssl_handshake_settings.cipherNames = ssl_bulk_ciphers
201 if ssl_key_exchanges is not None: 200 if ssl_key_exchanges is not None:
202 self.ssl_handshake_settings.keyExchangeNames = ssl_key_exchanges 201 self.ssl_handshake_settings.keyExchangeNames = ssl_key_exchanges
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 'alert immediately after the handshake.') 2299 'alert immediately after the handshake.')
2301 self.option_parser.add_option('--no-anonymous-ftp-user', 2300 self.option_parser.add_option('--no-anonymous-ftp-user',
2302 dest='no_anonymous_ftp_user', 2301 dest='no_anonymous_ftp_user',
2303 default=False, action='store_true', 2302 default=False, action='store_true',
2304 help='If set, the FTP server will not create ' 2303 help='If set, the FTP server will not create '
2305 'an anonymous user.') 2304 'an anonymous user.')
2306 2305
2307 2306
2308 if __name__ == '__main__': 2307 if __name__ == '__main__':
2309 sys.exit(ServerRunner().main()) 2308 sys.exit(ServerRunner().main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698