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

Unified Diff: net/base/keygen_handler.h

Issue 2806045: Give keys friendly names in NSS and OS X (Closed)
Patch Set: Address Wan-Teh's comments Created 10 years, 4 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/browser/renderer_host/resource_message_filter.cc ('k') | net/base/keygen_handler_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
}
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | net/base/keygen_handler_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698