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

Unified Diff: content/common/experiments/api_key.h

Issue 1522813002: Add public key and signature verification to browser-side API keys (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keys
Patch Set: Remove pk length param; fix broken test Created 4 years, 11 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 | content/common/experiments/api_key.cc » ('j') | content/common/experiments/api_key.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/experiments/api_key.h
diff --git a/content/common/experiments/api_key.h b/content/common/experiments/api_key.h
index 6b06ea279c070871a45a32312fa53490b9a0a82e..dd211876dfbdf8b852d00879270d834247e331ec 100644
--- a/content/common/experiments/api_key.h
+++ b/content/common/experiments/api_key.h
@@ -56,6 +56,11 @@ class CONTENT_EXPORT ApiKey {
bool ValidateOrigin(const std::string& origin) const;
bool ValidateApiName(const std::string& api_name) const;
bool ValidateDate(const base::Time& now) const;
+ bool ValidateSignature(const uint8_t* public_key) const;
davidben 2016/01/11 20:18:57 Passing in a bare pointer without some indication
iclelland 2016/01/12 14:52:49 I can certainly switch to StringPiece if that make
davidben 2016/01/13 20:50:39 I'm fine with whatever. StringPiece or code commen
iclelland 2016/01/13 21:30:11 I'm good with StringPiece (other than all of the r
davidben 2016/01/13 22:18:13 Yeah, having to add those casts drives me crazy. :
+
+ static bool ValidateSignature(const std::string& signature_text,
+ const std::string& data,
+ const uint8_t* public_key);
private:
ApiKey(const std::string& signature,
« no previous file with comments | « no previous file | content/common/experiments/api_key.cc » ('j') | content/common/experiments/api_key.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698