diff --git a/security/nss/lib/certhigh/certhigh.c b/security/nss/lib/certhigh/certhigh.c index db21fa1db9e..0e2befcaf07 100644 --- a/security/nss/lib/certhigh/certhigh.c +++ b/security/nss/lib/certhigh/certhigh.c @@ -1154,6 +1154,7 @@ loser: } derCert.len = (unsigned int)stanCert->encoding.size; derCert.data = (unsigned char *)stanCert->encoding.data; + derCert.type = siBuffer; SECITEM_CopyItem(arena, &chain->certs[i], &derCert); CERT_DestroyCertificate(cCert); stanCert = stanChain[++i]; diff --git a/security/nss/lib/pk11wrap/pk11skey.c b/security/nss/lib/pk11wrap/pk11skey.c index 83ac619cbf5..f99b2599533 100644 --- a/security/nss/lib/pk11wrap/pk11skey.c +++ b/security/nss/lib/pk11wrap/pk11skey.c @@ -2745,6 +2745,7 @@ pk11_HandUnwrap(PK11SlotInfo *slot, CK_OBJECT_HANDLE wrappingKey, } outKey.len = (key_size == 0) ? len : key_size; + outKey.type = siBuffer; if (PK11_DoesMechanism(slot,target)) { symKey = pk11_ImportSymKeyWithTempl(slot, target, PK11_OriginUnwrap, diff --git a/security/nss/lib/pk11wrap/pk11slot.c b/security/nss/lib/pk11wrap/pk11slot.c index bea6fdd9c85..2f3fcf6dfd6 100644 --- a/security/nss/lib/pk11wrap/pk11slot.c +++ b/security/nss/lib/pk11wrap/pk11slot.c @@ -3494,6 +3494,7 @@ PK11_ParamFromAlgid(SECAlgorithmID *algid) mech = (SECItem *) PORT_Alloc(sizeof(SECItem)); if (mech == NULL) return NULL; + mech->type = siBuffer; /* handle the complicated cases */ @@ -3803,6 +3804,7 @@ PK11_GenerateNewParam(CK_MECHANISM_TYPE type, PK11SymKey *key) { if (mech == NULL) return NULL; rv = SECSuccess; + mech->type = siBuffer; switch (type) { case CKM_RC4: case CKM_AES_ECB: diff --git a/security/nss/lib/pki/pki3hack.c b/security/nss/lib/pki/pki3hack.c index 66bb0f5d7f2..88cd7e73607 100644 --- a/security/nss/lib/pki/pki3hack.c +++ b/security/nss/lib/pki/pki3hack.c @@ -32,7 +32,7 @@ */ #ifdef DEBUG -static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.58 $ $Date: 2002-06-25 22:58:13 $ $Name: $"; +static const char CVS_ID[] = "@(#) $RCSfile: pki3hack.c,v $ $Revision: 1.59 $ $Date: 2002-06-28 03:00:06 $ $Name: $"; #endif /* DEBUG */ /* @@ -262,8 +262,10 @@ nss3certificate_getIssuerIdentifier(nssDecodedCert *dc) } issuerSN.derIssuer.data = caName->data; issuerSN.derIssuer.len = caName->len; + issuerSN.derIssuer.type = siBuffer; issuerSN.serialNumber.data = cAuthKeyID->authCertSerialNumber.data; issuerSN.serialNumber.len = cAuthKeyID->authCertSerialNumber.len; + issuerSN.serialNumber.type = siBuffer; issuer = PK11_FindCertByIssuerAndSN(NULL, &issuerSN, NULL); if (issuer) { rvID = nssItem_Create(NULL, NULL, issuer->subjectKeyID.len, diff --git a/security/nss/lib/softoken/pcertdb.c b/security/nss/lib/softoken/pcertdb.c index afecd7b29f9..c9dfebd138f 100644 --- a/security/nss/lib/softoken/pcertdb.c +++ b/security/nss/lib/softoken/pcertdb.c @@ -34,7 +34,7 @@ /* * Permanent Certificate database handling code * - * $Id: pcertdb.c,v 1.23 2002-06-24 21:54:39 relyea%netscape.com Exp $ + * $Id: pcertdb.c,v 1.24 2002-06-28 03:00:08 relyea%netscape.com Exp $ */ #include "prtime.h" @@ -1489,6 +1489,7 @@ DecodeDBNicknameEntry(certDBEntryNickname *entry, SECItem *dbentry, PORT_Memcpy(entry->subjectName.data, &dbentry->data[DB_NICKNAME_ENTRY_HEADER_LEN], entry->subjectName.len); + entry->subjectName.type = siBuffer; entry->nickname = (char *)PORT_ArenaAlloc(entry->common.arena, PORT_Strlen(nickname)+1); diff --git a/security/nss/lib/softoken/pkcs11.c b/security/nss/lib/softoken/pkcs11.c index f6028bf1d37..7b750a8da31 100644 --- a/security/nss/lib/softoken/pkcs11.c +++ b/security/nss/lib/softoken/pkcs11.c @@ -861,12 +861,14 @@ pk11_handleSMimeObject(PK11Session *session,PK11Object *object) PORT_Assert(subject); derSubj.data = (unsigned char *)subject->attrib.pValue; derSubj.len = subject->attrib.ulValueLen ; + derSubj.type = 0; /* lookup VALUE */ profile = pk11_FindAttribute(object,CKA_VALUE); if (profile) { rawProfile.data = (unsigned char *)profile->attrib.pValue; rawProfile.len = profile->attrib.ulValueLen ; + rawProfile.type = siBuffer; pRawProfile = &rawProfile; } @@ -875,6 +877,7 @@ pk11_handleSMimeObject(PK11Session *session,PK11Object *object) if (time) { rawTime.data = (unsigned char *)time->attrib.pValue; rawTime.len = time->attrib.ulValueLen ; + rawTime.type = siBuffer; pRawTime = &rawTime; } @@ -3643,6 +3646,7 @@ pk11_key_collect(DBT *key, DBT *data, void *arg) tmpDBKey.data = key->data; tmpDBKey.len = key->size; + tmpDBKey.type = siBuffer; PORT_Assert(slot->keyDB); if (!keyData->strict && keyData->id) { @@ -4032,6 +4036,7 @@ pk11_searchSMime(PK11Slot *slot, SECItem *email, PK11SearchResults *handles, emailKey.data = (unsigned char *)tmp_name; emailKey.len = PORT_Strlen(tmp_name)+1; + emailKey.type = 0; pk11_addHandle(handles, pk11_mkHandle(slot,&emailKey,PK11_TOKEN_TYPE_SMIME)); nsslowcert_DestroyDBEntry((certDBEntry *)entry); diff --git a/security/nss/lib/util/dertime.c b/security/nss/lib/util/dertime.c index 5fbdca656c1..75e1761a2cd 100644 --- a/security/nss/lib/util/dertime.c +++ b/security/nss/lib/util/dertime.c @@ -80,6 +80,7 @@ DER_TimeToUTCTime(SECItem *dst, int64 gmttime) dst->len = 13; dst->data = d = (unsigned char*) PORT_Alloc(13); + dst->type = siBuffer; if (!d) { return SECFailure; } @@ -228,6 +229,7 @@ DER_TimeToGeneralizedTime(SECItem *dst, int64 gmttime) dst->len = 15; dst->data = d = (unsigned char*) PORT_Alloc(15); + dst->type = siBuffer; if (!d) { return SECFailure; } diff --git a/security/nss/lib/util/secasn1e.c b/security/nss/lib/util/secasn1e.c index 8d0f544f222..b5aae2cf04b 100644 --- a/security/nss/lib/util/secasn1e.c +++ b/security/nss/lib/util/secasn1e.c @@ -35,7 +35,7 @@ * Support for ENcoding ASN.1 data based on BER/DER (Basic/Distinguished * Encoding Rules). * - * $Id: secasn1e.c,v 1.7 2002-02-21 22:41:42 ian.mcgreer%sun.com Exp $ + * $Id: secasn1e.c,v 1.8 2002-06-28 03:00:10 relyea%netscape.com Exp $ */ #include "secasn1.h" @@ -1460,6 +1460,7 @@ sec_asn1e_allocate_item (PRArenaPool *poolp, SECItem *dest, unsigned long len) if (dest == NULL) dest = (SECItem*)PORT_Alloc (sizeof(SECItem)); if (dest != NULL) { + dest->type = siBuffer; dest->data = (unsigned char*)PORT_Alloc (len); if (dest->data == NULL) { if (indest == NULL)