This commit is contained in:
relyea%netscape.com 2002-01-24 00:26:29 +00:00
Родитель 422c06a4ed
Коммит 65b7f7d46b
3 изменённых файлов: 13 добавлений и 5 удалений

Просмотреть файл

@ -32,7 +32,7 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.26 $ $Date: 2002-01-22 21:56:16 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.27 $ $Date: 2002-01-24 00:26:24 $ $Name: $";
#endif /* DEBUG */
#ifndef NSSPKI_H
@ -306,7 +306,8 @@ NSSCertificate_BuildChain
issuerID = dc->getIssuerIdentifier(dc);
if (issuerID) {
c = find_issuer_cert_for_identifier(c, issuerID);
nss_ZFreeIf(issuerID);
nssItem_Destroy(issuerID);
issuerID = NULL;
if (!c) {
nss_SetError(NSS_ERROR_CERTIFICATE_ISSUER_NOT_FOUND);
if (statusOpt) *statusOpt = PR_FAILURE;

Просмотреть файл

@ -32,7 +32,7 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.26 $ $Date: 2002-01-23 17:00:38 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.27 $ $Date: 2002-01-24 00:26:27 $ $Name: $";
#endif /* DEBUG */
/*
@ -352,6 +352,7 @@ nss3certificate_getDERSerialNumber(nssDecodedCert *dc,
secrv = CERT_SerialNumberFromDERCert(&cc->derCert, &derSerial);
if (secrv == SECSuccess) {
(void)nssItem_Create(arena, serial, derSerial.len, derSerial.data);
PORT_Free(derSerial.data);
return PR_SUCCESS;
}
return PR_FAILURE;

Просмотреть файл

@ -34,7 +34,7 @@
/*
* Permanent Certificate database handling code
*
* $Id: pcertdb.c,v 1.10 2002-01-23 01:44:22 relyea%netscape.com Exp $
* $Id: pcertdb.c,v 1.11 2002-01-24 00:26:29 relyea%netscape.com Exp $
*/
#include "prtime.h"
@ -2439,7 +2439,7 @@ UpdateSubjectWithEmailAddr(NSSLOWCERTCertDBHandle *dbhandle,
SECItem *derSubject, char *emailAddr)
{
PRBool save = PR_FALSE, delold = PR_FALSE;
certDBEntrySubject *entry;
certDBEntrySubject *entry = NULL;
SECStatus rv;
if (emailAddr) {
@ -2450,6 +2450,9 @@ UpdateSubjectWithEmailAddr(NSSLOWCERTCertDBHandle *dbhandle,
}
entry = ReadDBSubjectEntry(dbhandle,derSubject);
if (entry == NULL) {
goto loser;
}
if ( entry->emailAddr ) {
if ( (emailAddr == NULL) ||
@ -2495,10 +2498,12 @@ UpdateSubjectWithEmailAddr(NSSLOWCERTCertDBHandle *dbhandle,
}
}
DestroyDBEntry((certDBEntry *)entry);
if (emailAddr) PORT_Free(emailAddr);
return(SECSuccess);
loser:
if (entry) DestroyDBEntry((certDBEntry *)entry);
if (emailAddr) PORT_Free(emailAddr);
return(SECFailure);
}
@ -2845,6 +2850,7 @@ AddPermSubjectNode(certDBEntrySubject *entry, NSSLOWCERTCertificate *cert,
}
DeleteDBSubjectEntry(cert->dbhandle, &cert->derSubject);
rv = WriteDBSubjectEntry(cert->dbhandle, entry);
DestroyDBEntry((certDBEntry *)entry);
return(rv);
}