Skip to content

Commit

Permalink
Bug 738458, Upgrade Mozilla to NSS 3.13.5, landing beta2, r=bsmith/wtc
Browse files Browse the repository at this point in the history
  • Loading branch information
kaie committed May 18, 2012
1 parent fde16d4 commit 67523f0
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 14 deletions.
1 change: 0 additions & 1 deletion security/coreconf/coreconf.dep
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@

#error "Do not include this header file."


2 changes: 1 addition & 1 deletion security/nss/TAG-INFO
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NSS_3_13_5_BETA1
NSS_3_13_5_BETA2
2 changes: 1 addition & 1 deletion security/nss/TAG-INFO-CKBI
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NSS_3_13_5_BETA1
NSS_3_13_5_BETA2
10 changes: 7 additions & 3 deletions security/nss/lib/certdb/stanpcertdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,15 @@ __CERT_AddTempCertToPerm(CERTCertificate *cert, char *nickname,
}
stanNick = nssCertificate_GetNickname(c, NULL);
if (stanNick && nickname && strcmp(nickname, stanNick) != 0) {
/* take the new nickname */
/* different: take the new nickname */
cert->nickname = NULL;
nss_ZFreeIf(stanNick);
stanNick = NULL;
}
if (!stanNick && nickname) {
stanNick = nssUTF8_Duplicate((NSSUTF8 *)nickname, c->object.arena);
}
/* Either there was no nickname yet, or we have a new nickname */
stanNick = nssUTF8_Duplicate((NSSUTF8 *)nickname, NULL);
} /* else: old stanNick is identical to new nickname */
/* Delete the temp instance */
nssCertificateStore_Lock(context->certStore, &lockTrace);
nssCertificateStore_RemoveCertLOCKED(context->certStore, c);
Expand All @@ -336,6 +338,8 @@ __CERT_AddTempCertToPerm(CERTCertificate *cert, char *nickname,
&c->serial,
cert->emailAddr,
PR_TRUE);
nss_ZFreeIf(stanNick);
stanNick = NULL;
PK11_FreeSlot(slot);
if (!permInstance) {
if (NSS_GetError() == NSS_ERROR_INVALID_CERTIFICATE) {
Expand Down
2 changes: 2 additions & 0 deletions security/nss/lib/certhigh/certhigh.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ CollectNicknames( NSSCertificate *c, void *data)
stanNickname = nssCertificate_GetNickname(c,NULL);

if ( stanNickname ) {
nss_ZFreeIf(stanNickname);
stanNickname = NULL;
if (names->what == SEC_CERT_NICKNAMES_USER) {
saveit = NSSCertificate_IsPrivateKeyAvailable(c, NULL, NULL);
}
Expand Down
3 changes: 2 additions & 1 deletion security/nss/lib/pki/certificate.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* ***** END LICENSE BLOCK ***** */

#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.68 $ $Date: 2011/07/12 21:29:17 $";
static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.68.2.1 $ $Date: 2012/05/17 21:40:54 $";
#endif /* DEBUG */

#ifndef NSSPKI_H
Expand Down Expand Up @@ -230,6 +230,7 @@ nssCertificate_GetSubject (
}
}

/* Returns a copy, Caller must free using nss_ZFreeIf */
NSS_IMPLEMENT NSSUTF8 *
nssCertificate_GetNickname (
NSSCertificate *c,
Expand Down
3 changes: 2 additions & 1 deletion security/nss/lib/pki/pki.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define PKI_H

#ifdef DEBUG
static const char PKI_CVS_ID[] = "@(#) $RCSfile: pki.h,v $ $Revision: 1.13 $ $Date: 2005/01/20 02:25:49 $";
static const char PKI_CVS_ID[] = "@(#) $RCSfile: pki.h,v $ $Revision: 1.13.196.1 $ $Date: 2012/05/17 21:40:54 $";
#endif /* DEBUG */

#ifndef NSSDEVT_H
Expand Down Expand Up @@ -115,6 +115,7 @@ nssCertificate_GetSubject
NSSCertificate *c
);

/* Returns a copy, Caller must free using nss_ZFreeIf */
NSS_EXTERN NSSUTF8 *
nssCertificate_GetNickname
(
Expand Down
6 changes: 5 additions & 1 deletion security/nss/lib/pki/pki3hack.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* ***** END LICENSE BLOCK ***** */

#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.106 $ $Date: 2012/02/17 22:44:56 $";
static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.106.2.1 $ $Date: 2012/05/17 21:40:54 $";
#endif /* DEBUG */

/*
Expand Down Expand Up @@ -1168,6 +1168,8 @@ STAN_ChangeCertTrust(CERTCertificate *cc, CERTCertTrust *trust)
&c->serial,
email,
PR_TRUE);
nss_ZFreeIf(nickname);
nickname = NULL;
if (!newInstance) {
nssrv = PR_FAILURE;
goto done;
Expand Down Expand Up @@ -1200,6 +1202,8 @@ STAN_ChangeCertTrust(CERTCertificate *cc, CERTCertTrust *trust)
&c->serial,
email,
PR_TRUE);
nss_ZFreeIf(nickname);
nickname = NULL;
if (!newInstance) {
nssrv = PR_FAILURE;
goto done;
Expand Down
6 changes: 3 additions & 3 deletions security/nss/lib/pki/pkibase.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* ***** END LICENSE BLOCK ***** */

#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: pkibase.c,v $ $Revision: 1.33 $ $Date: 2010/04/03 18:27:32 $";
static const char CVS_ID[] = "@(#) $RCSfile: pkibase.c,v $ $Revision: 1.33.6.1 $ $Date: 2012/05/17 21:40:54 $";
#endif /* DEBUG */

#ifndef DEV_H
Expand Down Expand Up @@ -364,8 +364,8 @@ nssPKIObject_GetNicknameForToken (
if ((!tokenOpt && object->instances[i]->label) ||
(object->instances[i]->token == tokenOpt))
{
/* XXX should be copy? safe as long as caller has reference */
nickname = object->instances[i]->label;
/* Must copy, see bug 745548 */
nickname = nssUTF8_Duplicate(object->instances[i]->label, NULL);
break;
}
}
Expand Down
3 changes: 2 additions & 1 deletion security/nss/lib/pki/pkistore.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* ***** END LICENSE BLOCK ***** */

#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: pkistore.c,v $ $Revision: 1.34 $ $Date: 2010/12/17 02:34:07 $";
static const char CVS_ID[] = "@(#) $RCSfile: pkistore.c,v $ $Revision: 1.34.2.1 $ $Date: 2012/05/17 21:40:54 $";
#endif /* DEBUG */

#ifndef PKIM_H
Expand Down Expand Up @@ -458,6 +458,7 @@ static void match_nickname(const void *k, void *v, void *a)
{
nt->subjectList = subjectList;
}
nss_ZFreeIf(nickname);
}

/*
Expand Down
6 changes: 5 additions & 1 deletion security/nss/lib/pki/tdcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* ***** END LICENSE BLOCK ***** */

#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: tdcache.c,v $ $Revision: 1.49 $ $Date: 2010/02/10 02:04:32 $";
static const char CVS_ID[] = "@(#) $RCSfile: tdcache.c,v $ $Revision: 1.49.6.1 $ $Date: 2012/05/17 21:40:54 $";
#endif /* DEBUG */

#ifndef PKIM_H
Expand Down Expand Up @@ -771,6 +771,7 @@ add_cert_to_cache (
log_cert_ref("attempted to add cert already in cache", cert);
#endif
PZ_Unlock(td->cache->lock);
nss_ZFreeIf(certNickname);
/* collision - somebody else already added the cert
* to the cache before this thread got around to it.
*/
Expand Down Expand Up @@ -839,8 +840,11 @@ add_cert_to_cache (
}
rvCert = cert;
PZ_Unlock(td->cache->lock);
nss_ZFreeIf(certNickname);
return rvCert;
loser:
nss_ZFreeIf(certNickname);
certNickname = NULL;
/* Remove any handles that have been created */
subjectList = NULL;
if (added >= 1) {
Expand Down

0 comments on commit 67523f0

Please sign in to comment.