From 4ad67c653f9f16125f0fcac759eba48d7bc9bee4 Mon Sep 17 00:00:00 2001 From: "rsleevi@chromium.org" Date: Wed, 17 Oct 2012 03:18:58 +0000 Subject: Use the NSS internal key slot for all temporary key operations Rather than calling PK11_GetBestSlot, which requires enumerating all connected tokens, use PK11_GetInternalSlot, which explicitly uses the internal NSS key database. On Linux, this will ignore any user preferences regarding what tokens should be used for which mechanisms, but for internal/temporary operations, this is an acceptable tradeoff. BUG=chrome-os-partner:14707 Review URL: https://chromiumcodereview.appspot.com/11186004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162309 0039d316-1c4b-4281-b951-d872f2087c98 --- crypto/encryptor_nss.cc | 4 ---- 1 file changed, 4 deletions(-) (limited to 'crypto/encryptor_nss.cc') diff --git a/crypto/encryptor_nss.cc b/crypto/encryptor_nss.cc index cf4fa2a..280e38b 100644 --- a/crypto/encryptor_nss.cc +++ b/crypto/encryptor_nss.cc @@ -53,10 +53,6 @@ bool Encryptor::Init(SymmetricKey* key, if (mode == CBC && iv.size() != AES_BLOCK_SIZE) return false; - slot_.reset(PK11_GetBestSlot(GetMechanism(mode), NULL)); - if (!slot_.get()) - return false; - switch (mode) { case CBC: SECItem iv_item; -- cgit v1.1