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

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: serialized list protos -> repeated fields 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
Index: net/tools/testserver/testserver.py
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 9bad8623e9f27b9a19306ba54b58036f2836f512..bd1da6f45965f30e0993c61c4935c10f07b5f7ec 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 certificate to sign policy '
+ 'responses. This option may used multiple '
+ 'times to define a certificate chain. '
+ 'The first element of the chain should be the '
+ 'root certificate and the last element will be '
+ 'used for signing.')
Mattias Nissler (ping if slow) 2011/01/28 10:29:34 If you reverse the order, please update this comme
gfeher 2011/01/28 13:42:10 Done.
options, args = option_parser.parse_args()
sys.exit(main(options, args))
« net/tools/testserver/device_management.py ('K') | « net/tools/testserver/device_management.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698