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

Unified Diff: net/base/keygen_handler.h

Issue 384413004: Remove default key slot from KeygenHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing android_webview. Created 6 years, 5 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
Index: net/base/keygen_handler.h
diff --git a/net/base/keygen_handler.h b/net/base/keygen_handler.h
index 8262775505ceb3b7726c59ca85a8198f5cb0b0e3..7177735acfb1c96d968358ed19773154b90df4d2 100644
--- a/net/base/keygen_handler.h
+++ b/net/base/keygen_handler.h
@@ -13,8 +13,12 @@
#include "net/base/net_export.h"
#include "url/gurl.h"
+#if defined(USE_NSS)
+#include "crypto/scoped_nss_types.h"
+#endif
+
namespace crypto {
-class NSSCryptoModuleDelegate;
+class CryptoModuleBlockingPasswordDelegate;
}
namespace net {
@@ -42,12 +46,15 @@ class NET_EXPORT KeygenHandler {
void set_stores_key(bool store) { stores_key_ = store;}
#if defined(USE_NSS)
+ // Sets the key slot in which new key pairs will be generated.
+ void set_key_slot(crypto::ScopedPK11Slot slot);
+
// Register the delegate to be used to get the token to store the key in, and
// to get the password if the token is unauthenticated.
// GenKeyAndSignChallenge runs on a worker thread, so using a blocking
// password callback is okay here.
Ryan Sleevi 2014/07/15 21:22:33 This comment is out of date.
void set_crypto_module_delegate(
- scoped_ptr<crypto::NSSCryptoModuleDelegate> delegate);
+ scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate> delegate);
#endif // defined(USE_NSS)
private:
@@ -56,8 +63,11 @@ class NET_EXPORT KeygenHandler {
GURL url_; // the URL that requested the key
bool stores_key_; // should the generated key-pair be stored persistently?
#if defined(USE_NSS)
+ crypto::ScopedPK11Slot slot_;
+
// The callback for requesting a password to the PKCS#11 token.
- scoped_ptr<crypto::NSSCryptoModuleDelegate> crypto_module_delegate_;
+ scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate>
+ crypto_module_delegate_;
#endif // defined(USE_NSS)
};

Powered by Google App Engine
This is Rietveld 408576698