diff options
author | Moonchild <moonchild@palemoon.org> | 2023-02-19 15:26:44 +0100 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-02-19 15:26:44 +0100 |
commit | fb73c3aa3bf9ff40f13889d7d9a86d2c188c08eb (patch) | |
tree | 888f1b4e47599d766f86bd7e860973bfdffb6d98 /security | |
parent | 078a424cf335e6ea27933d427e7979c604bfc0cc (diff) | |
download | uxp-fb73c3aa3bf9ff40f13889d7d9a86d2c188c08eb.tar.gz |
[NSS] Update NSS to 3.52.9 to pick up fixes.
Diffstat (limited to 'security')
-rw-r--r-- | security/nss/coreconf/coreconf.dep | 1 | ||||
-rw-r--r-- | security/nss/lib/nss/nss.h | 4 | ||||
-rw-r--r-- | security/nss/lib/pkcs12/p12d.c | 19 | ||||
-rw-r--r-- | security/nss/lib/pkcs12/p12t.h | 1 | ||||
-rw-r--r-- | security/nss/lib/pkcs12/p12tmpl.c | 4 | ||||
-rw-r--r-- | security/nss/lib/softoken/softkver.h | 4 | ||||
-rw-r--r-- | security/nss/lib/util/nssutil.h | 4 |
7 files changed, 24 insertions, 13 deletions
diff --git a/security/nss/coreconf/coreconf.dep b/security/nss/coreconf/coreconf.dep index 590d1bfaee..5182f75552 100644 --- a/security/nss/coreconf/coreconf.dep +++ b/security/nss/coreconf/coreconf.dep @@ -10,4 +10,3 @@ */ #error "Do not include this header file." - diff --git a/security/nss/lib/nss/nss.h b/security/nss/lib/nss/nss.h index cd4c48593a..4fbc5c55cd 100644 --- a/security/nss/lib/nss/nss.h +++ b/security/nss/lib/nss/nss.h @@ -22,10 +22,10 @@ * The format of the version string should be * "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]" */ -#define NSS_VERSION "3.52.8" _NSS_CUSTOMIZED +#define NSS_VERSION "3.52.9" _NSS_CUSTOMIZED #define NSS_VMAJOR 3 #define NSS_VMINOR 52 -#define NSS_VPATCH 8 +#define NSS_VPATCH 9 #define NSS_VBUILD 0 #define NSS_BETA PR_FALSE diff --git a/security/nss/lib/pkcs12/p12d.c b/security/nss/lib/pkcs12/p12d.c index fae1626576..0ed8dbcb67 100644 --- a/security/nss/lib/pkcs12/p12d.c +++ b/security/nss/lib/pkcs12/p12d.c @@ -341,27 +341,38 @@ sec_pkcs12_decoder_safe_bag_update(void *arg, const char *data, * and that there are no errors. If so, just return rather * than continuing to process. */ - if (!safeContentsCtx || !safeContentsCtx->p12dcx || - safeContentsCtx->p12dcx->error || safeContentsCtx->skipCurrentSafeBag) { + if (!safeContentsCtx || !safeContentsCtx->p12dcx || safeContentsCtx->skipCurrentSafeBag) { return; } p12dcx = safeContentsCtx->p12dcx; + /* make sure that there are no errors and we are not skipping the current safeBag */ + if (p12dcx->error || safeContentsCtx->skipCurrentSafeBag) { + goto loser; + } + rv = SEC_ASN1DecoderUpdate(safeContentsCtx->currentSafeBagA1Dcx, data, len); if (rv != SECSuccess) { p12dcx->errorValue = PORT_GetError(); + p12dcx->error = PR_TRUE; + goto loser; + } + + /* The update may have set safeContentsCtx->skipCurrentSafeBag, and we + * may not get another opportunity to clean up the decoder context. + */ + if (safeContentsCtx->skipCurrentSafeBag) { goto loser; } return; loser: - /* set the error, and finish the decoder context. because there + /* Finish the decoder context. Because there * is not a way of returning an error message, it may be worth * while to do a check higher up and finish any decoding contexts * that are still open. */ - p12dcx->error = PR_TRUE; SEC_ASN1DecoderFinish(safeContentsCtx->currentSafeBagA1Dcx); safeContentsCtx->currentSafeBagA1Dcx = NULL; return; diff --git a/security/nss/lib/pkcs12/p12t.h b/security/nss/lib/pkcs12/p12t.h index b22f0dd823..d449afdd89 100644 --- a/security/nss/lib/pkcs12/p12t.h +++ b/security/nss/lib/pkcs12/p12t.h @@ -73,6 +73,7 @@ struct sec_PKCS12SafeBagStr { sec_PKCS12CRLBag *crlBag; sec_PKCS12SecretBag *secretBag; sec_PKCS12SafeContents *safeContents; + SECItem *unknownBag; } safeBagContent; sec_PKCS12Attribute **attribs; diff --git a/security/nss/lib/pkcs12/p12tmpl.c b/security/nss/lib/pkcs12/p12tmpl.c index 7437cbcc60..b08384f66a 100644 --- a/security/nss/lib/pkcs12/p12tmpl.c +++ b/security/nss/lib/pkcs12/p12tmpl.c @@ -30,12 +30,12 @@ sec_pkcs12_choose_safe_bag_type(void *src_or_dest, PRBool encoding) oiddata = SECOID_FindOID(&safeBag->safeBagType); if (oiddata == NULL) { - return SEC_ASN1_GET(SEC_AnyTemplate); + return SEC_ASN1_GET(SEC_PointerToAnyTemplate); } switch (oiddata->offset) { default: - theTemplate = SEC_ASN1_GET(SEC_AnyTemplate); + theTemplate = SEC_ASN1_GET(SEC_PointerToAnyTemplate); break; case SEC_OID_PKCS12_V1_KEY_BAG_ID: theTemplate = SEC_ASN1_GET(SECKEY_PointerToPrivateKeyInfoTemplate); diff --git a/security/nss/lib/softoken/softkver.h b/security/nss/lib/softoken/softkver.h index cb1a3f1fe9..2e8484ee01 100644 --- a/security/nss/lib/softoken/softkver.h +++ b/security/nss/lib/softoken/softkver.h @@ -17,10 +17,10 @@ * The format of the version string should be * "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]" */ -#define SOFTOKEN_VERSION "3.52.8" SOFTOKEN_ECC_STRING +#define SOFTOKEN_VERSION "3.52.9" SOFTOKEN_ECC_STRING #define SOFTOKEN_VMAJOR 3 #define SOFTOKEN_VMINOR 52 -#define SOFTOKEN_VPATCH 8 +#define SOFTOKEN_VPATCH 9 #define SOFTOKEN_VBUILD 0 #define SOFTOKEN_BETA PR_FALSE diff --git a/security/nss/lib/util/nssutil.h b/security/nss/lib/util/nssutil.h index a7cbf184c8..f482586164 100644 --- a/security/nss/lib/util/nssutil.h +++ b/security/nss/lib/util/nssutil.h @@ -19,10 +19,10 @@ * The format of the version string should be * "<major version>.<minor version>[.<patch level>[.<build number>]][ <Beta>]" */ -#define NSSUTIL_VERSION "3.52.8" +#define NSSUTIL_VERSION "3.52.9" #define NSSUTIL_VMAJOR 3 #define NSSUTIL_VMINOR 52 -#define NSSUTIL_VPATCH 8 +#define NSSUTIL_VPATCH 9 #define NSSUTIL_VBUILD 0 #define NSSUTIL_BETA PR_FALSE |