From 5edb883ec2ee17af7bc29aed09c55f271b1429bf Mon Sep 17 00:00:00 2001 From: "relyea%netscape.com" Date: Mon, 1 Aug 2005 18:27:30 +0000 Subject: [PATCH] ARG -- reverted to the wrong version. The correct version was 1.103, not 1.102 git-svn-id: svn://10.0.0.236/trunk@176933 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/softoken/pkcs11.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mozilla/security/nss/lib/softoken/pkcs11.c b/mozilla/security/nss/lib/softoken/pkcs11.c index 21c7465788c..b034801eba4 100644 --- a/mozilla/security/nss/lib/softoken/pkcs11.c +++ b/mozilla/security/nss/lib/softoken/pkcs11.c @@ -2558,11 +2558,10 @@ SFTK_SlotInit(char *configdir,sftk_token_parameters *params, int moduleIndex) /* if the data base is initialized with a null password,remember that */ slot->needLogin = (PRBool)!sftk_hasNullPassword(slot->keyDB,&slot->password); - if (params->minPW <= SFTK_MAX_PIN) { + if ((params->minPW >= 0) && (params->minPW <= SFTK_MAX_PIN)) { slot->minimumPinLen = params->minPW; } - if ((slot->minimumPinLen == 0) && (params->pwRequired) && - (slot->minimumPinLen <= SFTK_MAX_PIN)) { + if ((slot->minimumPinLen == 0) && (params->pwRequired)) { slot->minimumPinLen = 1; } } @@ -3049,10 +3048,7 @@ CK_RV NSC_GetTokenInfo(CK_SLOT_ID slotID,CK_TOKEN_INFO_PTR pInfo) CKF_LOGIN_REQUIRED | CKF_USER_PIN_INITIALIZED; } pInfo->ulMaxPinLen = SFTK_MAX_PIN; - pInfo->ulMinPinLen = 0; - if (slot->minimumPinLen > 0) { - pInfo->ulMinPinLen = (CK_ULONG)slot->minimumPinLen; - } + pInfo->ulMinPinLen = (CK_ULONG)slot->minimumPinLen; pInfo->ulTotalPublicMemory = 1; pInfo->ulFreePublicMemory = 1; pInfo->ulTotalPrivateMemory = 1;