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

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

Issue 6161007: New protocol and testserver for the Chrome-DMServer protocol (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments + some cleanup Created 9 years, 11 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/tools/testserver/device_management.py ('k') | no next file » | 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 9bad8623e9f27b9a19306ba54b58036f2836f512..eb2a02e2ab32ce3279d9991bb7dac7a92a8fcf3e 100755
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -1,5 +1,5 @@
#!/usr/bin/python2.4
-# Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -1284,7 +1284,8 @@ class TestPageHandler(BasePageHandler):
import device_management
policy_path = os.path.join(self.server.data_dir, 'device_management')
self.server._device_management_handler = (
- device_management.TestServer(policy_path))
+ device_management.TestServer(policy_path,
+ self.server.policy_cert_chain))
http_response, raw_reply = (
self.server._device_management_handler.HandleRequest(self.path,
@@ -1419,6 +1420,7 @@ def main(options, args):
server.file_root_url = options.file_root_url
server_data['port'] = server.server_port
server._device_management_handler = None
+ server.policy_cert_chain = options.policy_cert_chain
elif options.server_type == SERVER_SYNC:
server = SyncHTTPServer(('127.0.0.1', port), SyncPageHandler)
print 'Sync HTTP server started on port %d...' % server.server_port
@@ -1517,6 +1519,13 @@ if __name__ == '__main__':
option_parser.add_option('', '--startup-pipe', type='int',
dest='startup_pipe',
help='File handle of pipe to parent process')
+ option_parser.add_option('', '--policy-cert-chain', action='append',
+ help='Specify a path to a certificate file to sign '
+ 'policy responses. This option may be used '
+ 'multiple times to define a certificate chain. '
+ 'The first element will be used for signing, '
+ 'the last element should be the root '
+ 'certificate.')
options, args = option_parser.parse_args()
sys.exit(main(options, args))
« no previous file with comments | « net/tools/testserver/device_management.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698