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

Unified Diff: chrome/browser/devtools/device/usb/android_rsa.cc

Issue 560583002: Generalize crypto::SignatureCreator to allow choice of hash function, so as to support SHA256 (not … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, fix some lint issues, and a shameful missing ")" Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/device/usb/android_rsa.cc
diff --git a/chrome/browser/devtools/device/usb/android_rsa.cc b/chrome/browser/devtools/device/usb/android_rsa.cc
index a701845f7d3ec405c7494f0bbd9d0126cacfbd5e..df804e42a1480d28db35d71bfa14e5e4285b7ebd 100644
--- a/chrome/browser/devtools/device/usb/android_rsa.cc
+++ b/chrome/browser/devtools/device/usb/android_rsa.cc
@@ -262,8 +262,9 @@ std::string AndroidRSASign(crypto::RSAPrivateKey* key,
const std::string& body) {
std::vector<uint8> digest(body.begin(), body.end());
std::vector<uint8> result;
- if (!crypto::SignatureCreator::Sign(key, vector_as_array(&digest),
- digest.size(), &result)) {
+ if (!crypto::SignatureCreator::Sign(key, crypto::SignatureCreator::SHA1,
+ vector_as_array(&digest), digest.size(),
+ &result)) {
return std::string();
}
return std::string(result.begin(), result.end());
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698