summaryrefslogtreecommitdiffstats
path: root/components/ownership
diff options
context:
space:
mode:
authordougsteed <dougsteed@chromium.org>2014-09-19 11:46:09 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-19 18:46:27 +0000
commit0cf460ec9f9b56c22c5101ff599e7e842c541089 (patch)
tree6e75cdfae5ce1b830e7b1f2e7116c9e3c79b308e /components/ownership
parent4da78f3fc41cc4adfcc75ab943893fc359f3d2c1 (diff)
downloadchromium_src-0cf460ec9f9b56c22c5101ff599e7e842c541089.zip
chromium_src-0cf460ec9f9b56c22c5101ff599e7e842c541089.tar.gz
chromium_src-0cf460ec9f9b56c22c5101ff599e7e842c541089.tar.bz2
Generalize crypto::SignatureCreator to allow choice of hash function, so as to support SHA256 (not just SHA1).
BUG=412531 R=rsleevi@chromium.org,davidben@chromium.org TBR=pfeldman@chromium.org Review URL: https://codereview.chromium.org/560583002 Cr-Commit-Position: refs/heads/master@{#295747}
Diffstat (limited to 'components/ownership')
-rw-r--r--components/ownership/owner_settings_service.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/ownership/owner_settings_service.cc b/components/ownership/owner_settings_service.cc
index 09c88d3..56bcbe0 100644
--- a/components/ownership/owner_settings_service.cc
+++ b/components/ownership/owner_settings_service.cc
@@ -32,7 +32,8 @@ std::string AssembleAndSignPolicy(scoped_ptr<em::PolicyData> policy,
// Generate the signature.
scoped_ptr<crypto::SignatureCreator> signature_creator(
- crypto::SignatureCreator::Create(private_key));
+ crypto::SignatureCreator::Create(private_key,
+ crypto::SignatureCreator::SHA1));
signature_creator->Update(
reinterpret_cast<const uint8*>(policy_response.policy_data().c_str()),
policy_response.policy_data().size());