diff options
Diffstat (limited to 'security/nss/lib/pkcs12')
-rw-r--r-- | security/nss/lib/pkcs12/p12.h | 2 | ||||
-rw-r--r-- | security/nss/lib/pkcs12/p12e.c | 5 | ||||
-rw-r--r-- | security/nss/lib/pkcs12/p12t.h | 2 | ||||
-rw-r--r-- | security/nss/lib/pkcs12/pkcs12t.h | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/security/nss/lib/pkcs12/p12.h b/security/nss/lib/pkcs12/p12.h index 118db6efa..495bbf6c4 100644 --- a/security/nss/lib/pkcs12/p12.h +++ b/security/nss/lib/pkcs12/p12.h @@ -6,7 +6,7 @@ #define _P12_H_ #include "secoid.h" -#include "key.h" +#include "keyhi.h" #include "secpkcs7.h" #include "p12t.h" diff --git a/security/nss/lib/pkcs12/p12e.c b/security/nss/lib/pkcs12/p12e.c index 4a21d8955..c42c4d2e2 100644 --- a/security/nss/lib/pkcs12/p12e.c +++ b/security/nss/lib/pkcs12/p12e.c @@ -884,7 +884,9 @@ sec_PKCS12AddAttributeToBag(SEC_PKCS12ExportContext *p12ctxt, unsigned int nItems = 0; SECStatus rv; - if (!safeBag || !p12ctxt) { + PORT_Assert(p12ctxt->arena == safeBag->arena); + if (!safeBag || !p12ctxt || p12ctxt->arena != safeBag->arena) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); return SECFailure; } @@ -1589,6 +1591,7 @@ sec_pkcs12_encoder_start_context(SEC_PKCS12ExportContext *p12exp) params = PK11_CreatePBEParams(salt, &pwd, NSS_PBE_DEFAULT_ITERATION_COUNT); SECITEM_ZfreeItem(salt, PR_TRUE); + salt = NULL; SECITEM_ZfreeItem(&pwd, PR_FALSE); /* get the PBA Mechanism to generate the key */ diff --git a/security/nss/lib/pkcs12/p12t.h b/security/nss/lib/pkcs12/p12t.h index 62c2b502e..b22f0dd82 100644 --- a/security/nss/lib/pkcs12/p12t.h +++ b/security/nss/lib/pkcs12/p12t.h @@ -6,7 +6,7 @@ #define _P12T_H_ #include "secoid.h" -#include "key.h" +#include "keythi.h" #include "pkcs11.h" #include "secpkcs7.h" #include "secdig.h" /* for SGNDigestInfo */ diff --git a/security/nss/lib/pkcs12/pkcs12t.h b/security/nss/lib/pkcs12/pkcs12t.h index ad00d7b5b..db10d28af 100644 --- a/security/nss/lib/pkcs12/pkcs12t.h +++ b/security/nss/lib/pkcs12/pkcs12t.h @@ -8,7 +8,7 @@ #include "seccomon.h" #include "secoid.h" #include "cert.h" -#include "key.h" +#include "keythi.h" #include "plarena.h" #include "secpkcs7.h" #include "secdig.h" /* for SGNDigestInfo */ |