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..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) |
| }; |