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.
This commit is contained in:
mcgreer%netscape.com 2001-08-08 13:37:42 +00:00
Родитель 4aee1ae773
Коммит 39c992730b
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -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. */