Issue #1338: Follow-up: Cache the most recent PBKDF2 password hash,

to speed up repeated SDR operations.

Landed on NSS-3.48 for Bug 1606992
This commit is contained in:
Kai Engert 2020-01-14 13:08:48 +01:00 committed by Roy Tam
commit 3d75257e8d
2 changed files with 83 additions and 1 deletions

View file

@ -3097,6 +3097,9 @@ sftk_closePeer(PRBool isFIPS)
return;
}
extern void sftk_PBELockInit(void);
extern void sftk_PBELockShutdown(void);
/* NSC_Initialize initializes the Cryptoki library. */
CK_RV
nsc_CommonInitialize(CK_VOID_PTR pReserved, PRBool isFIPS)
@ -3113,6 +3116,8 @@ nsc_CommonInitialize(CK_VOID_PTR pReserved, PRBool isFIPS)
ENABLE_FORK_CHECK();
sftk_PBELockInit();
rv = SECOID_Init();
if (rv != SECSuccess) {
crv = CKR_DEVICE_ERROR;
@ -3293,6 +3298,8 @@ nsc_CommonFinalize(CK_VOID_PTR pReserved, PRBool isFIPS)
/* clean up the default OID table */
SECOID_Shutdown();
sftk_PBELockShutdown();
/* reset fork status in util */
UTIL_SetForkState(PR_FALSE);