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

@ -62,14 +62,15 @@ static void
token_destructor(void *t)
{
NSSToken *tok = (NSSToken *)t;
/* Remove the token list's reference to the token */
(void)nssToken_Destroy(tok);
/* Signal that the slot should not give out any more references to the
* token. The token might still have a positive refcount after this call.
* The token has a reference to the slot, so the slot will not be destroyed
* until after the token's refcount drops to 0. */
* token. Do this first, while |tok| (and its reference to the slot) is
* still alive: the list may hold the last reference, in which case
* nssToken_Destroy() below frees the arena that contains |tok|. */
PK11Slot_SetNSSToken(tok->pk11slot, NULL);
/* Remove the token list's reference to the token */
(void)nssToken_Destroy(tok);
}
NSS_IMPLEMENT PRStatus
@ -253,10 +254,11 @@ NSSTrustDomain_FindTokensByURI(
count = nssList_Count(td->tokenList);
tokens = nss_ZNEWARRAY(NULL, NSSToken *, count + 1);
if (!tokens) {
NSSRWLock_UnlockRead(td->tokensLock);
return NULL;
}
for (tok = (NSSToken *)nssListIterator_Start(td->tokens);
tok != (NSSToken *)NULL;
tok != (NSSToken *)NULL && i < count;
tok = (NSSToken *)nssListIterator_Next(td->tokens)) {
if (nssToken_IsPresent(tok)) {
slotinfo = tok->pk11slot;
@ -318,7 +320,7 @@ NSSTrustDomain_FindBestTokenForAlgorithms(
NSSTrustDomain *td,
NSSOID *algorithms[], /* may be null-terminated */
PRUint32 nAlgorithmsOpt /* limits the array if nonzero */
)
)
{
nss_SetError(NSS_ERROR_NOT_FOUND);
return NULL;