mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
re-introduce old nss im too tired for this
This commit is contained in:
parent
3c46be320d
commit
3a838106b9
2871 changed files with 1374431 additions and 1762417 deletions
|
|
@ -62,15 +62,14 @@ static void
|
|||
token_destructor(void *t)
|
||||
{
|
||||
NSSToken *tok = (NSSToken *)t;
|
||||
|
||||
/* Signal that the slot should not give out any more references to the
|
||||
* 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);
|
||||
|
||||
/* 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. */
|
||||
PK11Slot_SetNSSToken(tok->pk11slot, NULL);
|
||||
}
|
||||
|
||||
NSS_IMPLEMENT PRStatus
|
||||
|
|
@ -254,11 +253,10 @@ 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 && i < count;
|
||||
tok != (NSSToken *)NULL;
|
||||
tok = (NSSToken *)nssListIterator_Next(td->tokens)) {
|
||||
if (nssToken_IsPresent(tok)) {
|
||||
slotinfo = tok->pk11slot;
|
||||
|
|
@ -320,7 +318,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue