Index: net/base/keygen_handler.h |
diff --git a/net/base/keygen_handler.h b/net/base/keygen_handler.h |
index 4895dacb57e655d4e26360d761483fbe5cc15e1f..b778cee75c561faf9dd61fbba974f7e28df8157f 100644 |
--- a/net/base/keygen_handler.h |
+++ b/net/base/keygen_handler.h |
@@ -14,6 +14,7 @@ |
#if defined(USE_NSS) |
#include "crypto/crypto_module_blocking_password_delegate.h" |
+#include "crypto/scoped_nss_types.h" |
#endif // defined(USE_NSS) |
namespace net { |
@@ -41,12 +42,8 @@ class NET_EXPORT KeygenHandler { |
void set_stores_key(bool store) { stores_key_ = store;} |
#if defined(USE_NSS) |
- // Register the password delegate to be used if the token is unauthenticated. |
- // GenKeyAndSignChallenge runs on a worker thread, so using the blocking |
- // password callback is okay here. |
- // Takes ownership of the delegate. |
- void set_crypto_module_password_delegate( |
- crypto::CryptoModuleBlockingPasswordDelegate* delegate); |
+ void set_key_slot(crypto::ScopedPK11Slot slot, |
+ crypto::CryptoModuleBlockingPasswordDelegate* delegate); |
#endif // defined(USE_NSS) |
private: |
@@ -55,6 +52,8 @@ 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) |
+ // The PKCS#11 token to store the key in. |
+ crypto::ScopedPK11Slot slot_; |
// The callback for requesting a password to the PKCS#11 token. |
scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate> |
crypto_module_password_delegate_; |