mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 09:57:32 +09:00
Replace NSS with Pale Moon's
This commit is contained in:
parent
ff1e5e48bf
commit
8c2e376f94
2870 changed files with 1762232 additions and 1374220 deletions
|
|
@ -145,6 +145,7 @@ prng_Hash_df(PRUint8 *requested_bytes, unsigned int no_of_bytes_to_return,
|
|||
requested_bytes += hash_return_len;
|
||||
no_of_bytes_to_return -= hash_return_len;
|
||||
}
|
||||
SHA256_DestroyContext(&ctx, PR_FALSE);
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
|
|
@ -197,6 +198,7 @@ prng_initEntropy(void)
|
|||
SHA256_End(&ctx, globalrng->previousEntropyHash, NULL,
|
||||
sizeof(globalrng->previousEntropyHash));
|
||||
PORT_Memset(block, 0, sizeof(block));
|
||||
SHA256_DestroyContext(&ctx, PR_FALSE);
|
||||
return PR_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -244,6 +246,7 @@ prng_getEntropy(PRUint8 *buffer, size_t requestLength)
|
|||
}
|
||||
|
||||
out:
|
||||
PORT_Memset(hash, 0, sizeof hash);
|
||||
PORT_Memset(block, 0, sizeof block);
|
||||
return rv;
|
||||
}
|
||||
|
|
@ -388,6 +391,7 @@ prng_Hashgen(RNGContext *rng, PRUint8 *returned_bytes,
|
|||
* This increments data if no_of_returned_bytes is not zero */
|
||||
carry = no_of_returned_bytes;
|
||||
PRNG_ADD_CARRY_ONLY(data, (sizeof data) - 1, carry);
|
||||
SHA256_DestroyContext(&ctx, PR_FALSE);
|
||||
}
|
||||
PORT_Memset(data, 0, sizeof data);
|
||||
PORT_Memset(thisHash, 0, sizeof thisHash);
|
||||
|
|
@ -430,6 +434,7 @@ prng_generateNewBytes(RNGContext *rng,
|
|||
SHA256_End(&ctx, w, NULL, sizeof w);
|
||||
PRNG_ADD_BITS_AND_CARRY(V(rng), VSize(rng), w, sizeof w, carry)
|
||||
PORT_Memset(w, 0, sizeof w);
|
||||
SHA256_DestroyContext(&ctx, PR_FALSE);
|
||||
#undef w
|
||||
}
|
||||
|
||||
|
|
@ -450,6 +455,7 @@ prng_generateNewBytes(RNGContext *rng,
|
|||
PRNG_ADD_CARRY_ONLY(rng->reseed_counter, (sizeof rng->reseed_counter) - 1, carry);
|
||||
|
||||
/* if the prng failed, don't return any output, signal softoken */
|
||||
PORT_Memset(H, 0, sizeof H);
|
||||
if (!rng->isValid) {
|
||||
PORT_Memset(returned_bytes, 0, no_of_returned_bytes);
|
||||
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue