summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrelyea%netscape.com <devnull@localhost>2002-06-28 03:00:10 +0000
committerrelyea%netscape.com <devnull@localhost>2002-06-28 03:00:10 +0000
commitc8440750a740cd2af2a96ad7de0fea5c0dcc6194 (patch)
treed406a81e5eca841aa97dfac8a0f21c839e559f1c
parent21c468d557dcc685839d4855d0ad5f5d80b1d32d (diff)
downloadnss-hg-c8440750a740cd2af2a96ad7de0fea5c0dcc6194.tar.gz
Initialize type fields to supress purify uninitialized reference warnings.
-rw-r--r--security/nss/lib/certhigh/certhigh.c1
-rw-r--r--security/nss/lib/pk11wrap/pk11skey.c1
-rw-r--r--security/nss/lib/pk11wrap/pk11slot.c2
-rw-r--r--security/nss/lib/pki/pki3hack.c2
-rw-r--r--security/nss/lib/softoken/pcertdb.c1
-rw-r--r--security/nss/lib/softoken/pkcs11.c5
-rw-r--r--security/nss/lib/util/dertime.c2
-rw-r--r--security/nss/lib/util/secasn1e.c1
8 files changed, 15 insertions, 0 deletions
diff --git a/security/nss/lib/certhigh/certhigh.c b/security/nss/lib/certhigh/certhigh.c
index db21fa1db..0e2befcaf 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 83ac619cb..f99b25995 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 bea6fdd9c..2f3fcf6df 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 2e5a0e176..54a9baa94 100644
--- a/security/nss/lib/pki/pki3hack.c
+++ b/security/nss/lib/pki/pki3hack.c
@@ -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 6c8b5c958..b72582cf4 100644
--- a/security/nss/lib/softoken/pcertdb.c
+++ b/security/nss/lib/softoken/pcertdb.c
@@ -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 f6028bf1d..7b750a8da 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 5fbdca656..75e1761a2 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 4a23bcbba..7fe7943b5 100644
--- a/security/nss/lib/util/secasn1e.c
+++ b/security/nss/lib/util/secasn1e.c
@@ -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)