Replace NSS with Pale Moon's

This commit is contained in:
wuggy 2026-06-29 21:29:25 +01:00
commit 8c2e376f94
2870 changed files with 1762232 additions and 1374220 deletions

View file

@ -137,9 +137,11 @@ rm_dash_r(char *path)
/* Recursively delete all entries in the directory */
while ((entry = PR_ReadDir(dir, PR_SKIP_BOTH)) != NULL) {
sprintf(filename, "%s/%s", path, entry->name);
if (rm_dash_r(filename))
snprintf(filename, sizeof(filename), "%s/%s", path, entry->name);
if (rm_dash_r(filename)) {
PR_CloseDir(dir);
return -1;
}
}
if (PR_CloseDir(dir) != PR_SUCCESS) {
@ -428,51 +430,9 @@ out_of_memory(void)
void
VerifyCertDir(char *dir, char *keyName)
{
char fn[FNSIZE];
/* don't try verifying if we don't have a local directory */
if (strncmp(dir, "multiaccess:", sizeof("multiaccess:") - 1) == 0) {
return;
}
/* this function is truly evil. Tools and applications should not have
* any knowledge of actual cert databases! */
return;
/* This code is really broken because it makes underlying assumptions about
* how the NSS profile directory is laid out, but these names can change
* from release to release. */
sprintf(fn, "%s/cert8.db", dir);
if (PR_Access(fn, PR_ACCESS_EXISTS)) {
PR_fprintf(errorFD, "%s: No certificate database in \"%s\"\n",
PROGRAM_NAME, dir);
PR_fprintf(errorFD, "%s: Check the -d arguments that you gave\n",
PROGRAM_NAME);
errorCount++;
exit(ERRX);
}
if (verbosity >= 0) {
PR_fprintf(outputFD, "using certificate directory: %s\n", dir);
}
if (keyName == NULL)
return;
/* if the user gave the -k key argument, verify that
a key database already exists */
sprintf(fn, "%s/key3.db", dir);
if (PR_Access(fn, PR_ACCESS_EXISTS)) {
PR_fprintf(errorFD, "%s: No private key database in \"%s\"\n",
PROGRAM_NAME,
dir);
PR_fprintf(errorFD, "%s: Check the -d arguments that you gave\n",
PROGRAM_NAME);
errorCount++;
exit(ERRX);
}
}
/*
@ -688,7 +648,7 @@ secErrorString(long code)
c = "untrusted issuer";
break;
default:
sprintf(errstring, "security error %ld", code);
snprintf(errstring, sizeof(errstring), "security error %ld", code);
c = errstring;
break;
}
@ -972,7 +932,7 @@ get_default_cert_dir(void)
home = PR_GetEnvSecure("HOME");
if (home && *home) {
sprintf(db, "%s/.netscape", home);
snprintf(db, sizeof(db), "%s/.netscape", home);
cd = db;
}
#endif
@ -985,7 +945,7 @@ get_default_cert_dir(void)
home = PR_GetEnvSecure("JAR_HOME");
if (home && *home) {
sprintf(db, "%s/cert7.db", home);
snprintf(db, sizeof(db), "%s/cert7.db", home);
if ((fp = fopen(db, "r")) != NULL) {
fclose(fp);
@ -998,7 +958,7 @@ get_default_cert_dir(void)
if (cd == NULL) {
home = "c:/Program Files/Netscape/Navigator";
sprintf(db, "%s/cert7.db", home);
snprintf(db, sizeof(db), "%s/cert7.db", home);
if ((fp = fopen(db, "r")) != NULL) {
fclose(fp);
@ -1012,7 +972,7 @@ get_default_cert_dir(void)
if (cd == NULL) {
home = ".";
sprintf(db, "%s/cert7.db", home);
snprintf(db, sizeof(db), "%s/cert7.db", home);
if ((fp = fopen(db, "r")) != NULL) {
fclose(fp);