mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47: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
|
|
@ -1035,7 +1035,7 @@ CERT_CertChainFromCert(CERTCertificate *cert, SECCertUsage usage,
|
|||
NSSCertificate *stanCert;
|
||||
PLArenaPool *arena;
|
||||
NSSUsage nssUsage;
|
||||
int i, len;
|
||||
int i = 0, len;
|
||||
NSSTrustDomain *td = STAN_GetDefaultTrustDomain();
|
||||
NSSCryptoContext *cc = STAN_GetDefaultCryptoContext();
|
||||
|
||||
|
|
@ -1072,7 +1072,6 @@ CERT_CertChainFromCert(CERTCertificate *cert, SECCertUsage usage,
|
|||
chain->certs = (SECItem *)PORT_ArenaAlloc(arena, len * sizeof(SECItem));
|
||||
if (!chain->certs)
|
||||
goto loser;
|
||||
i = 0;
|
||||
stanCert = stanChain[i];
|
||||
while (stanCert) {
|
||||
SECItem derCert;
|
||||
|
|
@ -1084,7 +1083,7 @@ CERT_CertChainFromCert(CERTCertificate *cert, SECCertUsage usage,
|
|||
derCert.data = (unsigned char *)stanCert->encoding.data;
|
||||
derCert.type = siBuffer;
|
||||
if (SECITEM_CopyItem(arena, &chain->certs[i], &derCert) != SECSuccess) {
|
||||
CERT_DestroyCertificate(cCert);
|
||||
/* loser: will release stanChain[i]; don't release it here too. */
|
||||
goto loser;
|
||||
}
|
||||
stanCert = stanChain[++i];
|
||||
|
|
@ -1106,7 +1105,9 @@ CERT_CertChainFromCert(CERTCertificate *cert, SECCertUsage usage,
|
|||
nss_ZFreeIf(stanChain);
|
||||
return chain;
|
||||
loser:
|
||||
i = 0;
|
||||
/* Release only the chain entries not already released by the copy
|
||||
* loop above; entries 0..i-1 have already had their BuildChain
|
||||
* reference dropped, so start at i to avoid an over-release. */
|
||||
stanCert = stanChain[i];
|
||||
while (stanCert) {
|
||||
CERTCertificate *cCert = STAN_GetCERTCertificate(stanCert);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue