| Index: net/base/keygen_handler.h
|
| diff --git a/net/base/keygen_handler.h b/net/base/keygen_handler.h
|
| index 3f3a1151c3d30009369112f1e6ec024f4467c10e..5ca6027ba2c3164f3a0ba1b86f522c507876a58c 100644
|
| --- a/net/base/keygen_handler.h
|
| +++ b/net/base/keygen_handler.h
|
| @@ -8,6 +8,8 @@
|
|
|
| #include <string>
|
|
|
| +#include "googleurl/src/gurl.h"
|
| +
|
| namespace net {
|
|
|
| // This class handles keypair generation for generating client
|
| @@ -17,9 +19,12 @@ namespace net {
|
|
|
| class KeygenHandler {
|
| public:
|
| - // Creates a handler that will generate a key with the given key size
|
| - // and incorporate the |challenge| into the Netscape SPKAC structure.
|
| - inline KeygenHandler(int key_size_in_bits, const std::string& challenge);
|
| + // Creates a handler that will generate a key with the given key size and
|
| + // incorporate the |challenge| into the Netscape SPKAC structure. The request
|
| + // for the key originated from |url|.
|
| + inline KeygenHandler(int key_size_in_bits,
|
| + const std::string& challenge,
|
| + const GURL& url);
|
|
|
| // Actually generates the key-pair and the cert request (SPKAC), and returns
|
| // a base64-encoded string suitable for use as the form value of <keygen>.
|
| @@ -31,13 +36,16 @@ class KeygenHandler {
|
| private:
|
| int key_size_in_bits_; // key size in bits (usually 2048)
|
| std::string challenge_; // challenge string sent by server
|
| + GURL url_; // the URL that requested the key
|
| bool stores_key_; // should the generated key-pair be stored persistently?
|
| };
|
|
|
| KeygenHandler::KeygenHandler(int key_size_in_bits,
|
| - const std::string& challenge)
|
| + const std::string& challenge,
|
| + const GURL& url)
|
| : key_size_in_bits_(key_size_in_bits),
|
| challenge_(challenge),
|
| + url_(url),
|
| stores_key_(true) {
|
| }
|
|
|
|
|