summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/softoken/lgglue.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/lib/softoken/lgglue.c')
-rw-r--r--security/nss/lib/softoken/lgglue.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/security/nss/lib/softoken/lgglue.c b/security/nss/lib/softoken/lgglue.c
index 67f17943b..94f054129 100644
--- a/security/nss/lib/softoken/lgglue.c
+++ b/security/nss/lib/softoken/lgglue.c
@@ -171,8 +171,6 @@ sftkdb_encrypt_stub(PLArenaPool *arena, SDB *sdb, SECItem *plainText,
{
SFTKDBHandle *handle = sdb->app_private;
SECStatus rv;
- SECItem *key;
- int iterationCount;
if (handle == NULL) {
return SECFailure;
@@ -194,15 +192,9 @@ sftkdb_encrypt_stub(PLArenaPool *arena, SDB *sdb, SECItem *plainText,
/* PORT_SetError */
return SECFailure;
}
- if (handle->newKey) {
- key = handle->newKey;
- iterationCount = handle->newDefaultIterationCount;
- } else {
- key = &handle->passwordKey;
- iterationCount = handle->defaultIterationCount;
- }
- rv = sftkdb_EncryptAttribute(arena, key, iterationCount,
+ rv = sftkdb_EncryptAttribute(arena,
+ handle->newKey ? handle->newKey : &handle->passwordKey,
plainText, cipherText);
PZ_Unlock(handle->passwordLock);