| 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..2a8c9cb34c68ca4798e4b4b14638a00495256b32 100644
|
| --- a/components/client_update_protocol/ecdsa.h
|
| +++ b/components/client_update_protocol/ecdsa.h
|
| @@ -13,6 +13,12 @@
|
|
|
| #include "base/strings/string_piece.h"
|
|
|
| +// Testing peers. There's a better way to do this, but it probably makes sense
|
| +// to wait til there are one or two more.
|
| +namespace network_time {
|
| +class NetworkTimeTrackerTest;
|
| +} // namespace network_time
|
| +
|
| namespace client_update_protocol {
|
|
|
| // Client Update Protocol v2, or CUP-ECDSA, is used by Google Update (Omaha)
|
| @@ -51,16 +57,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
|
|
|