From fbc2eaacd679f0c484993ffe23d786fd06da22c3 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 26 Jun 2019 15:13:18 +0200 Subject: Update NSS to 3.41.1 (custom) This resolves #82 --- security/nss/lib/softoken/lgglue.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'security/nss/lib/softoken/lgglue.c') diff --git a/security/nss/lib/softoken/lgglue.c b/security/nss/lib/softoken/lgglue.c index 94f054129..67f17943b 100644 --- a/security/nss/lib/softoken/lgglue.c +++ b/security/nss/lib/softoken/lgglue.c @@ -171,6 +171,8 @@ 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; @@ -192,9 +194,15 @@ 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, - handle->newKey ? handle->newKey : &handle->passwordKey, + rv = sftkdb_EncryptAttribute(arena, key, iterationCount, plainText, cipherText); PZ_Unlock(handle->passwordLock); -- cgit v1.2.3 From 4b188510af097627f117482dfc7c3d308c845385 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 26 Jun 2019 23:32:13 +0200 Subject: Revert "Update NSS to 3.41.1 (custom)" This reverts commit fbc2eaacd679f0c484993ffe23d786fd06da22c3. --- security/nss/lib/softoken/lgglue.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'security/nss/lib/softoken/lgglue.c') 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); -- cgit v1.2.3 From 3c568a5681bac0a84f7a49697951780170ad182c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 27 Jun 2019 00:45:42 +0200 Subject: Update NSS to 3.41.1 (custom) This resolves #82 --- security/nss/lib/softoken/lgglue.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'security/nss/lib/softoken/lgglue.c') diff --git a/security/nss/lib/softoken/lgglue.c b/security/nss/lib/softoken/lgglue.c index 94f054129..67f17943b 100644 --- a/security/nss/lib/softoken/lgglue.c +++ b/security/nss/lib/softoken/lgglue.c @@ -171,6 +171,8 @@ 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; @@ -192,9 +194,15 @@ 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, - handle->newKey ? handle->newKey : &handle->passwordKey, + rv = sftkdb_EncryptAttribute(arena, key, iterationCount, plainText, cipherText); PZ_Unlock(handle->passwordLock); -- cgit v1.2.3