diff options
author | ian.mcgreer%sun.com <devnull@localhost> | 2002-09-26 20:30:11 +0000 |
---|---|---|
committer | ian.mcgreer%sun.com <devnull@localhost> | 2002-09-26 20:30:11 +0000 |
commit | b91c104635539799e59995c15d4c9ff8e795e2fa (patch) | |
tree | 4d38d48557c115146c2475840fe6a0193c233c81 | |
parent | 396c37c2089bfcf44f33e4ea1a4e528a7b3a13e6 (diff) | |
download | nss-hg-b91c104635539799e59995c15d4c9ff8e795e2fa.tar.gz |
bug 158078, unitialized variable due to a lot of unneccessary code
-rw-r--r-- | security/nss/cmd/certutil/certutil.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/security/nss/cmd/certutil/certutil.c b/security/nss/cmd/certutil/certutil.c index 6b154f944..e482f81dc 100644 --- a/security/nss/cmd/certutil/certutil.c +++ b/security/nss/cmd/certutil/certutil.c @@ -531,8 +531,7 @@ printCertCB(CERTCertificate *cert, void *arg) } static SECStatus -dumpChain(CERTCertDBHandle *handle, char *name, PK11SlotInfo *slot, - PRBool raw, PRBool ascii, PRFileDesc *outfile, void *pwarg) +DumpChain(CERTCertDBHandle *handle, char *name) { SECStatus rv; CERTCertificate *the_cert; @@ -642,29 +641,6 @@ ListCerts(CERTCertDBHandle *handle, char *name, PK11SlotInfo *slot, return rv; } -static SECStatus -DumpChain(CERTCertDBHandle *handle, char *name, PK11SlotInfo *slot, - PRBool raw, PRBool ascii, PRFileDesc *outfile, secuPWData *pwdata) -{ - SECStatus rv; - - if (slot == NULL) { - PK11SlotList *list; - PK11SlotListElement *le; - - list= PK11_GetAllTokens(CKM_INVALID_MECHANISM, - PR_FALSE,PR_FALSE,pwdata); - if (list) for (le = list->head; le; le = le->next) { - printf("\n\nListing certificates for %s:\n\n", PK11_GetSlotName(le->slot)); - rv = dumpChain(handle,name,le->slot,raw,ascii,outfile,pwdata); - } - } else { - rv = dumpChain(handle,name,slot,raw,ascii,outfile,pwdata); - } - return rv; -} - - static SECStatus DeleteCert(CERTCertDBHandle *handle, char *name) { @@ -2531,10 +2507,7 @@ main(int argc, char **argv) goto shutdown; } if (certutil.commands[cmd_DumpChain].activated) { - rv = DumpChain(certHandle, name, slot, - certutil.options[opt_BinaryDER].activated, - certutil.options[opt_ASCIIForIO].activated, - (outFile) ? outFile : PR_STDOUT, &pwdata); + rv = DumpChain(certHandle, name); goto shutdown; } /* XXX needs work */ |