Remove default key slot from KeygenHandler.
commit47c9bee78437e6a933ed45c40d942b4cf88fd49f
authorpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 17 Jul 2014 04:05:12 +0000 (17 04:05 +0000)
committerpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 17 Jul 2014 04:05:12 +0000 (17 04:05 +0000)
tree6da5796e203069d1e1f2e2c12fd4e6447a41e4b4
parent0218586ce6a1bef5d80892c943157e9921278953
Remove default key slot from KeygenHandler.

KeygenHandler defaulted to use the persistent key slot. However, the Handler is also used in ChromeOS where no such global persistent slot exists.

This change removes this default behavior from KeygenHandler.
Instead only the slot provided by the CryptoModuleDelegate will be used.
If no CryptoModuleDelegate is set, then an error will be thrown on keygen usage.

The unit test of KeygenHandler now explicitly provides the slot through a StubCryptoModuleDelegate.
In a follow up, the crypto::GetPersistentNSSKeySlot() call will be removed from the unit tests as well and instead the test slot will be get()'ed from the ScopedTestNSSDB.

BUG=210525

Review URL: https://codereview.chromium.org/384413004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283634 0039d316-1c4b-4281-b951-d872f2087c98
net/base/keygen_handler_nss.cc
net/base/keygen_handler_unittest.cc