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

Unified Diff: chrome/browser/chromeos/platform_keys/platform_keys.h

Issue 331173002: enterprise.platformKeys: Respect the 'hash' argument of generateKey. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
Index: chrome/browser/chromeos/platform_keys/platform_keys.h
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys.h b/chrome/browser/chromeos/platform_keys/platform_keys.h
index de27fb4610741ef88fdc5b0aee3f65b01ce584a9..f102b142ecf0bc08d23ffa61ba03117b8047295d 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys.h
+++ b/chrome/browser/chromeos/platform_keys/platform_keys.h
@@ -47,13 +47,15 @@ typedef base::Callback<void(const std::string& signature,
const std::string& error_message)> SignCallback;
// Signs |data| with the private key matching |public_key|, if that key is
-// stored in the given token. |token_id| is currently ignored, instead the user
-// token associated with |profile| is always used. |public_key| must be the DER
-// encoding of a SubjectPublicKeyInfo. |callback| will be invoked with the
-// signature or an error message.
+// stored in the given token. Uses |hash_algorithm_name| to digest |data|, which
+// must be one of SHA-{1,256,384,512}. |token_id| is currently ignored, instead
+// the user token associated with |profile| is always used. |public_key| must be
+// the DER encoding of a SubjectPublicKeyInfo. |callback| will be invoked with
+// the signature or an error message.
// Currently supports RSA keys only.
void Sign(const std::string& token_id,
const std::string& public_key,
+ const std::string& hash_algorithm_name,
const std::string& data,
const SignCallback& callback,
Profile* profile);

Powered by Google App Engine
This is Rietveld 408576698