mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 09:57:32 +09:00
Update NSS to 3.41
This commit is contained in:
parent
d5f6e64f43
commit
5f0986e66f
540 changed files with 49568 additions and 10631 deletions
|
|
@ -161,7 +161,7 @@ verifyPKCS1DigestInfo(const VFYContext *cx, const SECItem *digest)
|
|||
pkcs1DigestInfo.len = cx->pkcs1RSADigestInfoLen;
|
||||
return _SGN_VerifyPKCS1DigestInfo(
|
||||
cx->hashAlg, digest, &pkcs1DigestInfo,
|
||||
PR_TRUE /*XXX: unsafeAllowMissingParameters*/);
|
||||
PR_FALSE /*XXX: unsafeAllowMissingParameters*/);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -257,25 +257,13 @@ sec_DecodeSigAlg(const SECKEYPublicKey *key, SECOidTag sigAlg,
|
|||
break;
|
||||
case SEC_OID_PKCS1_RSA_PSS_SIGNATURE:
|
||||
if (param && param->data) {
|
||||
SECKEYRSAPSSParams pssParam;
|
||||
arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
|
||||
if (arena == NULL) {
|
||||
return SECFailure;
|
||||
}
|
||||
PORT_Memset(&pssParam, 0, sizeof pssParam);
|
||||
rv = SEC_QuickDERDecodeItem(arena, &pssParam,
|
||||
SECKEY_RSAPSSParamsTemplate,
|
||||
param);
|
||||
if (rv != SECSuccess) {
|
||||
PORT_FreeArena(arena, PR_FALSE);
|
||||
return rv;
|
||||
}
|
||||
if (pssParam.hashAlg) {
|
||||
*hashalg = SECOID_GetAlgorithmTag(pssParam.hashAlg);
|
||||
} else {
|
||||
*hashalg = SEC_OID_SHA1; /* default, SHA-1 */
|
||||
}
|
||||
PORT_FreeArena(arena, PR_FALSE);
|
||||
PORTCheapArenaPool tmpArena;
|
||||
|
||||
PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
|
||||
rv = sec_DecodeRSAPSSParams(&tmpArena.arena, param,
|
||||
hashalg, NULL, NULL);
|
||||
PORT_DestroyCheapArena(&tmpArena);
|
||||
|
||||
/* only accept hash algorithms */
|
||||
if (HASH_GetHashTypeByOidTag(*hashalg) == HASH_AlgNULL) {
|
||||
/* error set by HASH_GetHashTypeByOidTag */
|
||||
|
|
@ -658,27 +646,17 @@ VFY_EndWithSignature(VFYContext *cx, SECItem *sig)
|
|||
if (cx->encAlg == SEC_OID_PKCS1_RSA_PSS_SIGNATURE) {
|
||||
CK_RSA_PKCS_PSS_PARAMS mech;
|
||||
SECItem mechItem = { siBuffer, (unsigned char *)&mech, sizeof(mech) };
|
||||
SECKEYRSAPSSParams params;
|
||||
PLArenaPool *arena;
|
||||
PORTCheapArenaPool tmpArena;
|
||||
|
||||
arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
|
||||
if (arena == NULL) {
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
PORT_Memset(¶ms, 0, sizeof(params));
|
||||
rv = SEC_QuickDERDecodeItem(arena, ¶ms,
|
||||
SECKEY_RSAPSSParamsTemplate,
|
||||
cx->params);
|
||||
if (rv != SECSuccess) {
|
||||
PORT_FreeArena(arena, PR_FALSE);
|
||||
return SECFailure;
|
||||
}
|
||||
rv = sec_RSAPSSParamsToMechanism(&mech, ¶ms);
|
||||
PORT_FreeArena(arena, PR_FALSE);
|
||||
PORT_InitCheapArena(&tmpArena, DER_DEFAULT_CHUNKSIZE);
|
||||
rv = sec_DecodeRSAPSSParamsToMechanism(&tmpArena.arena,
|
||||
cx->params,
|
||||
&mech);
|
||||
PORT_DestroyCheapArena(&tmpArena);
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
rsasig.data = cx->u.buffer;
|
||||
rsasig.len = SECKEY_SignatureLen(cx->key);
|
||||
if (rsasig.len == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue