diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 13:50:27 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-23 13:50:27 +0000 |
commit | b83da25ac55105daebc62eb56509efc46d1103cf (patch) | |
tree | 64637fd5c4bb826b1c1f7bae7c6eb1bc944ed4b7 /net | |
parent | ff6c38d6dc90b0bafe92b24f5f4657ff535f813e (diff) | |
download | chromium_src-b83da25ac55105daebc62eb56509efc46d1103cf.zip chromium_src-b83da25ac55105daebc62eb56509efc46d1103cf.tar.gz chromium_src-b83da25ac55105daebc62eb56509efc46d1103cf.tar.bz2 |
Retry the auto-enrollment check when the server asks for a smaller modulus.
BUG=chromium-os:28062
TEST=Send more bits with --enterprise-enrollment-initial-modulus than the server expects. AE still succeeds.
Review URL: http://codereview.chromium.org/9835021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/tools/testserver/device_management.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/tools/testserver/device_management.py b/net/tools/testserver/device_management.py index 22f34bc..1f1959d 100644 --- a/net/tools/testserver/device_management.py +++ b/net/tools/testserver/device_management.py @@ -277,6 +277,8 @@ class RequestHandler(object): 2: replies with a new modulus, 4. 4: replies with a new modulus, 2. 8: fails with error 400. + 16: replies with a new modulus, 16. + 32: replies with a new modulus, 1. anything else: replies with no new modulus and an empty list of hashes These allow the client to pick the testing scenario its wants to simulate. @@ -297,6 +299,10 @@ class RequestHandler(object): auto_enrollment_response.expected_modulus = 2 elif msg.modulus == 8: return (400, 'Server error') + elif msg.modulus == 16: + auto_enrollment_response.expected_modulus = 16 + elif msg.modulus == 32: + auto_enrollment_response.expected_modulus = 1 response = dm.DeviceManagementResponse() response.auto_enrollment_response.CopyFrom(auto_enrollment_response) |