mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 16:37:31 +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
|
|
@ -16,6 +16,7 @@
|
|||
#include "sslbloom.h"
|
||||
#include "sslimpl.h"
|
||||
#include "tls13hkdf.h"
|
||||
#include "tls13psk.h"
|
||||
|
||||
struct SSLAntiReplayContextStr {
|
||||
/* The number of outstanding references to this context. */
|
||||
|
|
@ -55,8 +56,7 @@ tls13_ReleaseAntiReplayContext(SSLAntiReplayContext *ctx)
|
|||
PORT_Free(ctx);
|
||||
}
|
||||
|
||||
/* Clear the current state and free any resources we allocated. The signature
|
||||
* here is odd to allow this to be called during shutdown. */
|
||||
/* Clear the current state and free any resources we allocated. */
|
||||
SECStatus
|
||||
SSLExp_ReleaseAntiReplayContext(SSLAntiReplayContext *ctx)
|
||||
{
|
||||
|
|
@ -75,26 +75,17 @@ tls13_RefAntiReplayContext(SSLAntiReplayContext *ctx)
|
|||
static SECStatus
|
||||
tls13_AntiReplayKeyGen(SSLAntiReplayContext *ctx)
|
||||
{
|
||||
PRUint8 buf[32];
|
||||
SECItem keyItem = { siBuffer, buf, sizeof(buf) };
|
||||
PK11SlotInfo *slot;
|
||||
SECStatus rv;
|
||||
|
||||
PORT_Assert(ctx);
|
||||
|
||||
slot = PK11_GetInternalSlot();
|
||||
slot = PK11_GetBestSlot(CKM_HKDF_DERIVE, NULL);
|
||||
if (!slot) {
|
||||
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
|
||||
return SECFailure;
|
||||
}
|
||||
rv = PK11_GenerateRandomOnSlot(slot, buf, sizeof(buf));
|
||||
if (rv != SECSuccess) {
|
||||
goto loser;
|
||||
}
|
||||
|
||||
ctx->key = PK11_ImportSymKey(slot, CKM_NSS_HKDF_SHA256,
|
||||
PK11_OriginUnwrap, CKA_DERIVE,
|
||||
&keyItem, NULL);
|
||||
ctx->key = PK11_KeyGen(slot, CKM_HKDF_KEY_GEN, NULL, 32, NULL);
|
||||
if (!ctx->key) {
|
||||
goto loser;
|
||||
}
|
||||
|
|
@ -259,7 +250,9 @@ tls13_IsReplay(const sslSocket *ss, const sslSessionID *sid)
|
|||
return PR_TRUE;
|
||||
}
|
||||
|
||||
if (!tls13_InWindow(ss, sid)) {
|
||||
if (!sid) {
|
||||
PORT_Assert(ss->xtnData.selectedPsk->type == ssl_psk_external);
|
||||
} else if (!tls13_InWindow(ss, sid)) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -269,7 +262,7 @@ tls13_IsReplay(const sslSocket *ss, const sslSessionID *sid)
|
|||
ss->xtnData.pskBinder.data,
|
||||
ss->xtnData.pskBinder.len,
|
||||
label, strlen(label),
|
||||
buf, size);
|
||||
ss->protocolVariant, buf, size);
|
||||
if (rv != SECSuccess) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue