Chromium Code Reviews| Index: components/client_update_protocol/ecdsa.h |
| diff --git a/components/update_client/client_update_protocol_ecdsa.h b/components/client_update_protocol/ecdsa.h |
| similarity index 82% |
| rename from components/update_client/client_update_protocol_ecdsa.h |
| rename to components/client_update_protocol/ecdsa.h |
| index 2459c8c8bee5a6cfe01ebb6a90c3ebb9ccd65084..f83a70ec3d86445ae4e46c314de3c3cb777a1575 100644 |
| --- a/components/update_client/client_update_protocol_ecdsa.h |
| +++ b/components/client_update_protocol/ecdsa.h |
| @@ -2,8 +2,8 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef COMPONENTS_UPDATE_CLIENT_CLIENT_UPDATE_PROTOCOL_ECDSA_H_ |
| -#define COMPONENTS_UPDATE_CLIENT_CLIENT_UPDATE_PROTOCOL_ECDSA_H_ |
| +#ifndef COMPONENTS_CLIENT_UPDATE_PROTOCOL_ECDSA_H_ |
| +#define COMPONENTS_CLIENT_UPDATE_PROTOCOL_ECDSA_H_ |
| #include <stdint.h> |
| @@ -13,7 +13,7 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "base/strings/string_piece.h" |
| -namespace update_client { |
| +namespace client_update_protocol { |
| // Client Update Protocol v2, or CUP-ECDSA, is used by Google Update (Omaha) |
| // servers to ensure freshness and authenticity of update checks over HTTP, |
| @@ -24,20 +24,19 @@ namespace update_client { |
| // instead of the original CUP which used HMAC-SHA1 with a random signing key |
| // encrypted using RSA. |
| // |
| -// Each ClientUpdateProtocolEcdsa object represents a single update check in |
| +// Each Ecdsa object represents a single update check in |
|
Sorin Jianu
2016/03/16 22:22:47
idea: fix the terminology so that it refers to pro
mab
2016/03/16 22:50:35
Good idea. I rewrote all the instances I could fi
Sorin Jianu
2016/03/16 23:05:54
Acknowledged.
|
| // flight -- a call to SignRequest() generates internal state that will be used |
| // by ValidateResponse(). |
| -class ClientUpdateProtocolEcdsa { |
| +class Ecdsa { |
|
Sorin Jianu
2016/03/16 22:22:47
Maybe rename to EcdsaSigner?
mab
2016/03/16 22:50:35
That's a bit tricky: as documented on |SignRequest
Sorin Jianu
2016/03/16 23:05:54
Acknowledged.
|
| public: |
| - ~ClientUpdateProtocolEcdsa(); |
| + ~Ecdsa(); |
| // Initializes this instance of CUP-ECDSA with a versioned public key. |
| // |key_version| must be non-negative. |public_key| is expected to be a |
| // DER-encoded ASN.1 SubjectPublicKeyInfo containing an ECDSA public key. |
| // Returns a NULL pointer on failure. |
| - static scoped_ptr<ClientUpdateProtocolEcdsa> Create( |
| - int key_version, |
| - const base::StringPiece& public_key); |
| + static scoped_ptr<Ecdsa> Create(int key_version, |
| + const base::StringPiece& public_key); |
| // Generates freshness/authentication data for an outgoing update check. |
| // |request_body| contains the body of the update check request in UTF-8. |
| @@ -62,8 +61,7 @@ class ClientUpdateProtocolEcdsa { |
| private: |
| friend class CupEcdsaTest; |
| - ClientUpdateProtocolEcdsa(int key_version, |
| - const base::StringPiece& public_key); |
| + Ecdsa(int key_version, const base::StringPiece& public_key); |
| // The server keeps multiple signing keys; a version must be sent so that |
| // the correct signing key is used to sign the assembled message. |
| @@ -80,9 +78,9 @@ class ClientUpdateProtocolEcdsa { |
| // modified on each call to SignRequest(), and checked by ValidateResponse(). |
| std::string request_query_cup2key_; |
| - DISALLOW_IMPLICIT_CONSTRUCTORS(ClientUpdateProtocolEcdsa); |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(Ecdsa); |
| }; |
| } // namespace update_client |
| -#endif // COMPONENTS_UPDATE_CLIENT_CLIENT_UPDATE_PROTOCOL_ECDSA_H_ |
| +#endif // COMPONENTS_CLIENT_UPDATE_PROTOCOL_ECDSA_H_ |