summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-19 16:46:50 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-19 16:46:50 +0000
commitbf9c2b1de590fe21c106afab5e01e4b96dcfdc11 (patch)
tree34245acb67146988454ffb2f8291f769fa42e636 /components
parent1f534f8a5017bf410b7042d49209b5938f34da04 (diff)
downloadchromium_src-bf9c2b1de590fe21c106afab5e01e4b96dcfdc11.zip
chromium_src-bf9c2b1de590fe21c106afab5e01e4b96dcfdc11.tar.gz
chromium_src-bf9c2b1de590fe21c106afab5e01e4b96dcfdc11.tar.bz2
Turn on policy key verification by default
BUG=275291 Review URL: https://codereview.chromium.org/189913016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/policy/core/common/cloud/cloud_policy_constants.cc2
-rw-r--r--components/policy/core/common/cloud/cloud_policy_validator_unittest.cc6
-rw-r--r--components/policy/core/common/cloud/user_cloud_policy_store_unittest.cc3
-rw-r--r--components/policy/core/common/policy_switches.cc6
-rw-r--r--components/policy/core/common/policy_switches.h2
5 files changed, 6 insertions, 13 deletions
diff --git a/components/policy/core/common/cloud/cloud_policy_constants.cc b/components/policy/core/common/cloud/cloud_policy_constants.cc
index e740677..4fa410b 100644
--- a/components/policy/core/common/cloud/cloud_policy_constants.cc
+++ b/components/policy/core/common/cloud/cloud_policy_constants.cc
@@ -92,7 +92,7 @@ std::string GetPolicyVerificationKey() {
// Disable key verification by default until production servers generate
// the proper signatures.
CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (!command_line->HasSwitch(switches::kEnablePolicyKeyVerification)) {
+ if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) {
return std::string();
} else {
return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey),
diff --git a/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
index 7cf4465..91689d2 100644
--- a/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
+++ b/components/policy/core/common/cloud/cloud_policy_validator_unittest.cc
@@ -5,7 +5,6 @@
#include <vector>
#include "base/bind.h"
-#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
@@ -48,11 +47,6 @@ class CloudPolicyValidatorTest : public testing::Test {
policy_.SetDefaultNewSigningKey();
}
- virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnablePolicyKeyVerification);
- }
-
void Validate(testing::Action<void(UserCloudPolicyValidator*)> check_action) {
policy_.Build();
ValidatePolicy(check_action, policy_.GetCopy());
diff --git a/components/policy/core/common/cloud/user_cloud_policy_store_unittest.cc b/components/policy/core/common/cloud/user_cloud_policy_store_unittest.cc
index 6e828bf..08a3f70 100644
--- a/components/policy/core/common/cloud/user_cloud_policy_store_unittest.cc
+++ b/components/policy/core/common/cloud/user_cloud_policy_store_unittest.cc
@@ -4,7 +4,6 @@
#include "components/policy/core/common/cloud/user_cloud_policy_store.h"
-#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/message_loop/message_loop.h"
@@ -57,8 +56,6 @@ class UserCloudPolicyStoreTest : public testing::Test {
UserCloudPolicyStoreTest() {}
virtual void SetUp() OVERRIDE {
- CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnablePolicyKeyVerification);
ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir());
store_.reset(
new UserCloudPolicyStore(policy_file(),
diff --git a/components/policy/core/common/policy_switches.cc b/components/policy/core/common/policy_switches.cc
index b7d2810..5a7878f 100644
--- a/components/policy/core/common/policy_switches.cc
+++ b/components/policy/core/common/policy_switches.cc
@@ -24,8 +24,10 @@ const char kDisableCloudPolicyPush[] = "disable-cloud-policy-push";
// Enables fetching and storing cloud policy for components.
const char kEnableComponentCloudPolicy[] = "enable-component-cloud-policy";
-// Enables the verification of policy signing keys.
-const char kEnablePolicyKeyVerification[] = "enable-policy-key-verification";
+// Disables the verification of policy signing keys.
+// TODO(atwilson): Remove this once all test servers have been updated to
+// produce verification signatures.
+const char kDisablePolicyKeyVerification[] = "disable-policy-key-verification";
#if defined(OS_ANDROID) || defined(OS_IOS)
// Registers for cloud policy using the BROWSER client type instead of the
diff --git a/components/policy/core/common/policy_switches.h b/components/policy/core/common/policy_switches.h
index 4e4e539..6880ecd 100644
--- a/components/policy/core/common/policy_switches.h
+++ b/components/policy/core/common/policy_switches.h
@@ -16,7 +16,7 @@ POLICY_EXPORT extern const char kCloudPolicyInvalidationDelay[];
POLICY_EXPORT extern const char kDeviceManagementUrl[];
POLICY_EXPORT extern const char kDisableCloudPolicyPush[];
POLICY_EXPORT extern const char kEnableComponentCloudPolicy[];
-POLICY_EXPORT extern const char kEnablePolicyKeyVerification[];
+POLICY_EXPORT extern const char kDisablePolicyKeyVerification[];
#if defined(OS_ANDROID) || defined(OS_IOS)
POLICY_EXPORT extern const char kFakeCloudPolicyType[];