mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-08 08:17:31 +09:00
Revert "Update NSS to 3.35-RTM"
This reverts commit f1a0f0a56fdd0fc39f255174ce08c06b91c66c94.
This commit is contained in:
parent
5f958910dd
commit
9e32522120
388 changed files with 24887 additions and 43210 deletions
|
|
@ -57,7 +57,6 @@ typedef enum {
|
|||
UNSPECIFIED_ERR,
|
||||
NOCERTDB_MISUSE_ERR,
|
||||
NSS_INITIALIZE_FAILED_ERR,
|
||||
INITPW_FAILED_ERR,
|
||||
|
||||
LAST_ERR /* must be last */
|
||||
} Error;
|
||||
|
|
@ -110,9 +109,8 @@ static char *errStrings[] = {
|
|||
"ERROR: Failed to change default.\n",
|
||||
"ERROR: Unable to read from standard input.\n",
|
||||
"ERROR: Unknown error occurred.\n",
|
||||
"ERROR: -nocertdb option can only be used with the -jar command.\n",
|
||||
"ERROR: NSS_Initialize() failed.\n",
|
||||
"ERROR: Unable to set initial password on the database.\n"
|
||||
"ERROR: -nocertdb option can only be used with the -jar command.\n"
|
||||
"ERROR: NSS_Initialize() failed.\n"
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
|
|
@ -975,7 +975,8 @@ Pk11Install_Platform_Print(Pk11Install_Platform* _this, int pad)
|
|||
printf("Doesn't use equiv\n");
|
||||
}
|
||||
PAD(pad);
|
||||
printf("Module File: %s\n", _this->moduleFile ? _this->moduleFile : "<NULL>");
|
||||
printf("Module File: %s\n", _this->moduleFile ? _this->moduleFile
|
||||
: "<NULL>");
|
||||
PAD(pad);
|
||||
printf("mechFlags: %lx\n", _this->mechFlags);
|
||||
PAD(pad);
|
||||
|
|
|
|||
|
|
@ -865,7 +865,7 @@ main(int argc, char* argv[])
|
|||
errcode = ChangePW(tokenName, pwFile, newpwFile);
|
||||
break;
|
||||
case CREATE_COMMAND:
|
||||
errcode = InitPW();
|
||||
/* The work was already done in init_crypto() */
|
||||
break;
|
||||
case DEFAULT_COMMAND:
|
||||
errcode = SetDefaultModule(moduleName, slotName, mechanisms);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ Error AddModule(char *moduleName, char *libFile, char *ciphers,
|
|||
Error DeleteModule(char *moduleName);
|
||||
Error ListModule(char *moduleName);
|
||||
Error ListModules();
|
||||
Error InitPW(void);
|
||||
Error ChangePW(char *tokenName, char *pwFile, char *newpwFile);
|
||||
Error EnableModule(char *moduleName, char *slotName, PRBool enable);
|
||||
Error RawAddModule(char *dbmodulespec, char *modulespec);
|
||||
|
|
|
|||
|
|
@ -668,39 +668,6 @@ 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
|
||||
|
|
@ -728,7 +695,7 @@ ChangePW(char *tokenName, char *pwFile, char *newpwFile)
|
|||
ret = BAD_PW_ERR;
|
||||
goto loser;
|
||||
}
|
||||
} else if (PK11_NeedLogin(slot)) {
|
||||
} else {
|
||||
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