mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
Update NSS to 3.35-RTM
This commit is contained in:
parent
23de11e5cd
commit
608f9fca02
388 changed files with 39075 additions and 20752 deletions
|
|
@ -668,6 +668,39 @@ loser:
|
|||
return rv;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* I n i t P W
|
||||
*/
|
||||
Error
|
||||
InitPW(void)
|
||||
{
|
||||
PK11SlotInfo *slot;
|
||||
Error ret = UNSPECIFIED_ERR;
|
||||
|
||||
slot = PK11_GetInternalKeySlot();
|
||||
if (!slot) {
|
||||
PR_fprintf(PR_STDERR, errStrings[NO_SUCH_TOKEN_ERR], "internal");
|
||||
return NO_SUCH_TOKEN_ERR;
|
||||
}
|
||||
|
||||
/* Set the initial password to empty */
|
||||
if (PK11_NeedUserInit(slot)) {
|
||||
if (PK11_InitPin(slot, NULL, "") != SECSuccess) {
|
||||
PR_fprintf(PR_STDERR, errStrings[INITPW_FAILED_ERR]);
|
||||
ret = INITPW_FAILED_ERR;
|
||||
goto loser;
|
||||
}
|
||||
}
|
||||
|
||||
ret = SUCCESS;
|
||||
|
||||
loser:
|
||||
PK11_FreeSlot(slot);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* C h a n g e P W
|
||||
|
|
@ -695,7 +728,7 @@ ChangePW(char *tokenName, char *pwFile, char *newpwFile)
|
|||
ret = BAD_PW_ERR;
|
||||
goto loser;
|
||||
}
|
||||
} else {
|
||||
} else if (PK11_NeedLogin(slot)) {
|
||||
for (matching = PR_FALSE; !matching;) {
|
||||
oldpw = SECU_GetPasswordString(NULL, "Enter old password: ");
|
||||
if (PK11_CheckUserPassword(slot, oldpw) == SECSuccess) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue