Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 5 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 0x13, 0x04, 0x57, 0xC5, 0x85, 0xB6, 0x2A, 0x0F, 0x02, 0x46, 0x0D, 0x2D, | 91 0x13, 0x04, 0x57, 0xC5, 0x85, 0xB6, 0x2A, 0x0F, 0x02, 0x46, 0x0D, 0x2D, |
| 92 0xCA, 0xE3, 0x3F, 0x84, 0x9E, 0x8B, 0x8A, 0x5F, 0xFC, 0x4D, 0xAA, 0xBE, | 92 0xCA, 0xE3, 0x3F, 0x84, 0x9E, 0x8B, 0x8A, 0x5F, 0xFC, 0x4D, 0xAA, 0xBE, |
| 93 0xBD, 0xE6, 0x64, 0x9F, 0x26, 0x9A, 0x2B, 0x97, 0x69, 0xA9, 0xBA, 0x0B, | 93 0xBD, 0xE6, 0x64, 0x9F, 0x26, 0x9A, 0x2B, 0x97, 0x69, 0xA9, 0xBA, 0x0B, |
| 94 0xBD, 0x48, 0xE4, 0x81, 0x6B, 0xD4, 0x4B, 0x78, 0xE6, 0xAF, 0x95, 0x66, | 94 0xBD, 0x48, 0xE4, 0x81, 0x6B, 0xD4, 0x4B, 0x78, 0xE6, 0xAF, 0x95, 0x66, |
| 95 0xC1, 0x23, 0xDA, 0x23, 0x45, 0x36, 0x6E, 0x25, 0xF3, 0xC7, 0xC0, 0x61, | 95 0xC1, 0x23, 0xDA, 0x23, 0x45, 0x36, 0x6E, 0x25, 0xF3, 0xC7, 0xC0, 0x61, |
| 96 0xFC, 0xEC, 0x66, 0x9D, 0x31, 0xD4, 0xD6, 0xB6, 0x36, 0xE3, 0x7F, 0x81, | 96 0xFC, 0xEC, 0x66, 0x9D, 0x31, 0xD4, 0xD6, 0xB6, 0x36, 0xE3, 0x7F, 0x81, |
| 97 0x87, 0x02, 0x03, 0x01, 0x00, 0x01}; | 97 0x87, 0x02, 0x03, 0x01, 0x00, 0x01}; |
| 98 | 98 |
| 99 const char kPolicyVerificationKeyHash[] = "1:356l7w"; | 99 const char kPolicyVerificationKeyHash[] = "1:356l7w"; |
| 100 | 100 |
| 101 std::string GetPolicyVerificationKey() { | 101 std::string GetPolicyVerificationKey() { |
|
pmarko
2017/01/04 13:50:22
Do you think that we should still expose this as a
pastarmovj
2017/01/04 14:37:27
I think this function is still useful utility for
| |
| 102 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 102 return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey), |
| 103 if (command_line->HasSwitch(switches::kDisablePolicyKeyVerification)) { | 103 sizeof(kPolicyVerificationKey)); |
| 104 return std::string(); | |
| 105 } else { | |
| 106 return std::string(reinterpret_cast<const char*>(kPolicyVerificationKey), | |
| 107 sizeof(kPolicyVerificationKey)); | |
| 108 } | |
| 109 } | 104 } |
| 110 | 105 |
| 111 } // namespace policy | 106 } // namespace policy |
| OLD | NEW |