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

Unified Diff: components/client_update_protocol/ecdsa.cc

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 | « components/client_update_protocol/ecdsa.h ('k') | components/client_update_protocol/ecdsa_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/client_update_protocol/ecdsa.cc
diff --git a/components/client_update_protocol/ecdsa.cc b/components/client_update_protocol/ecdsa.cc
index dc41a73b5093334a2819075e5bf75ea4d9ef103e..71547936a35cc19790a291e713a147d90dd29b73 100644
--- a/components/client_update_protocol/ecdsa.cc
+++ b/components/client_update_protocol/ecdsa.cc
@@ -98,9 +98,13 @@ std::unique_ptr<Ecdsa> Ecdsa::Create(int key_version,
return base::WrapUnique(new Ecdsa(key_version, public_key));
}
+void Ecdsa::OverrideNonceForTesting(int key_version, uint32_t nonce) {
+ DCHECK(!request_query_cup2key_.empty());
+ request_query_cup2key_ = base::StringPrintf("%d:%u", pub_key_version_, nonce);
+}
+
void Ecdsa::SignRequest(const base::StringPiece& request_body,
std::string* query_params) {
- DCHECK(!request_body.empty());
DCHECK(query_params);
// Generate a random nonce to use for freshness, build the cup2key query
« no previous file with comments | « components/client_update_protocol/ecdsa.h ('k') | components/client_update_protocol/ecdsa_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698