From 39c992730bcbb3bf1f3db236d3f1ccaa442f694c Mon Sep 17 00:00:00 2001 From: "mcgreer%netscape.com" Date: Wed, 8 Aug 2001 13:37:42 +0000 Subject: [PATCH] Look for the private key when listing keys. The second part of this patch was checked in, see revision 1.28. Yet, somehow, it never showed up. --- security/nss/cmd/certutil/certutil.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/security/nss/cmd/certutil/certutil.c b/security/nss/cmd/certutil/certutil.c index a3a6bc077a5..2507c2a96fd 100644 --- a/security/nss/cmd/certutil/certutil.c +++ b/security/nss/cmd/certutil/certutil.c @@ -849,10 +849,10 @@ secu_PrintKeyFromCert(CERTCertificate *cert, void *data) { FILE *out; char *name; - SECKEYPublicKey *key; + SECKEYPrivateKey *key; out = (FILE *)data; - key = CERT_ExtractPublicKey(cert); + key = PK11_FindPrivateKeyFromCert(PK11_GetInternalKeySlot(), cert, NULL); if (!key) { fprintf(out, "XXX could not extract key for %s.\n", cert->nickname); return SECFailure; @@ -2595,6 +2595,7 @@ main(int argc, char **argv) SECU_PrintError(progName, "unable to generate key(s)\n"); return -1; } + privkey->wincx = &pwdata; PORT_Assert(pubkey != NULL); /* If all that was needed was keygen, exit. */