Chromium Code Reviews| Index: net/base/keygen_handler.h |
| diff --git a/net/base/keygen_handler.h b/net/base/keygen_handler.h |
| index 8262775505ceb3b7726c59ca85a8198f5cb0b0e3..54073b3ffd8703778e062d7305af07c6ce19117c 100644 |
| --- a/net/base/keygen_handler.h |
| +++ b/net/base/keygen_handler.h |
| @@ -10,11 +10,12 @@ |
| #include "base/callback_forward.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "build/build_config.h" |
| +#include "crypto/scoped_nss_types.h" |
| #include "net/base/net_export.h" |
| #include "url/gurl.h" |
| namespace crypto { |
| -class NSSCryptoModuleDelegate; |
| +class CryptoModuleBlockingPasswordDelegate; |
| } |
| namespace net { |
| @@ -42,12 +43,14 @@ class NET_EXPORT KeygenHandler { |
| void set_stores_key(bool store) { stores_key_ = store;} |
| #if defined(USE_NSS) |
| + void set_key_slot(PK11SlotInfo* slot); |
|
Ryan Sleevi
2014/07/14 21:54:25
Any reason this shouldn't be a crypto::ScopedPK11S
|
| + |
| // 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. |
| void set_crypto_module_delegate( |
| - scoped_ptr<crypto::NSSCryptoModuleDelegate> delegate); |
| + scoped_ptr<crypto::CryptoModuleBlockingPasswordDelegate> delegate); |
| #endif // defined(USE_NSS) |
| private: |
| @@ -56,8 +59,10 @@ 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) |
| }; |