| OLD | NEW |
| 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 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1934 ocsp_dates = list() | 1934 ocsp_dates = list() |
| 1935 for ocsp_date_arg in self.options.ocsp_date.split(':'): | 1935 for ocsp_date_arg in self.options.ocsp_date.split(':'): |
| 1936 if ocsp_date_arg == 'valid': | 1936 if ocsp_date_arg == 'valid': |
| 1937 ocsp_date = minica.OCSP_DATE_VALID | 1937 ocsp_date = minica.OCSP_DATE_VALID |
| 1938 elif ocsp_date_arg == 'old': | 1938 elif ocsp_date_arg == 'old': |
| 1939 ocsp_date = minica.OCSP_DATE_OLD | 1939 ocsp_date = minica.OCSP_DATE_OLD |
| 1940 elif ocsp_date_arg == 'early': | 1940 elif ocsp_date_arg == 'early': |
| 1941 ocsp_date = minica.OCSP_DATE_EARLY | 1941 ocsp_date = minica.OCSP_DATE_EARLY |
| 1942 elif ocsp_date_arg == 'long': | 1942 elif ocsp_date_arg == 'long': |
| 1943 ocsp_date = minica.OCSP_DATE_LONG | 1943 ocsp_date = minica.OCSP_DATE_LONG |
| 1944 elif ocsp_date_arg == 'before_cert': | |
| 1945 ocsp_date = minica.OCSP_DATE_AFTER_CERT | |
| 1946 elif ocsp_date_arg == 'after_cert': | |
| 1947 ocsp_date = minica.OCSP_DATE_AFTER_CERT | |
| 1948 else: | 1944 else: |
| 1949 raise testserver_base.OptionError('unknown OCSP date: ' + | 1945 raise testserver_base.OptionError('unknown OCSP date: ' + |
| 1950 ocsp_date_arg) | 1946 ocsp_date_arg) |
| 1951 ocsp_dates.append(ocsp_date) | 1947 ocsp_dates.append(ocsp_date) |
| 1952 | 1948 |
| 1953 if len(ocsp_states) != len(ocsp_dates): | 1949 if len(ocsp_states) != len(ocsp_dates): |
| 1954 raise testserver_base.OptionError('mismatched ocsp and ocsp-date ' | 1950 raise testserver_base.OptionError('mismatched ocsp and ocsp-date ' |
| 1955 'count') | 1951 'count') |
| 1956 | 1952 |
| 1957 ocsp_produced = None | 1953 ocsp_produced = None |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2259 'an anonymous user.') | 2255 'an anonymous user.') |
| 2260 self.option_parser.add_option('--disable-channel-id', action='store_true') | 2256 self.option_parser.add_option('--disable-channel-id', action='store_true') |
| 2261 self.option_parser.add_option('--disable-extended-master-secret', | 2257 self.option_parser.add_option('--disable-extended-master-secret', |
| 2262 action='store_true') | 2258 action='store_true') |
| 2263 self.option_parser.add_option('--token-binding-params', action='append', | 2259 self.option_parser.add_option('--token-binding-params', action='append', |
| 2264 default=[], type='int') | 2260 default=[], type='int') |
| 2265 | 2261 |
| 2266 | 2262 |
| 2267 if __name__ == '__main__': | 2263 if __name__ == '__main__': |
| 2268 sys.exit(ServerRunner().main()) | 2264 sys.exit(ServerRunner().main()) |
| OLD | NEW |