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

Unified Diff: components/client_update_protocol/ecdsa.h

Issue 1835823002: network_time_tracker: add temporary time protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lint Created 4 years, 7 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 | « chrome/test/base/testing_browser_process.cc ('k') | components/client_update_protocol/ecdsa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/client_update_protocol/ecdsa.h
diff --git a/components/client_update_protocol/ecdsa.h b/components/client_update_protocol/ecdsa.h
index 889a396e2b450ea5be827ff2d3797577ea6f663e..24e4171ba8e59c39060dec4d4a29121460189c18 100644
--- a/components/client_update_protocol/ecdsa.h
+++ b/components/client_update_protocol/ecdsa.h
@@ -51,16 +51,18 @@ class Ecdsa {
// Validates a response given to a ping previously signed with
// SignRequest(). |response_body| contains the body of the response in
- // UTF-8. |server_proof| contains the ECDSA signature and observed request
- // hash, which is passed in the ETag HTTP header. Returns true if the response
- // is valid and the observed request hash matches the sent hash. This method
- // uses internal state that is set by a prior SignRequest() call.
+ // UTF-8. |signature| contains the ECDSA signature and observed request
+ // hash. Returns true if the response is valid and the observed request hash
+ // matches the sent hash. This method uses internal state that is set by a
+ // prior SignRequest() call.
bool ValidateResponse(const base::StringPiece& response_body,
- const base::StringPiece& server_etag);
+ const base::StringPiece& signature);
- private:
- friend class CupEcdsaTest;
+ // Sets the key and nonce that were used to generate a signature that is baked
+ // into a unit test.
+ void OverrideNonceForTesting(int key_version, uint32_t nonce);
+ private:
Ecdsa(int key_version, const base::StringPiece& public_key);
// The server keeps multiple signing keys; a version must be sent so that
« no previous file with comments | « chrome/test/base/testing_browser_process.cc ('k') | components/client_update_protocol/ecdsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698