Coverted tabs to spaces
This commit is contained in:
parent
deb8b0e9e2
commit
eff035f7f8
19
keyutil.c
19
keyutil.c
|
@ -605,9 +605,6 @@ CreateCert(
|
|||
return (rv);
|
||||
}
|
||||
|
||||
//static certutilExtnList certutil_extns;
|
||||
|
||||
//struct KeyPairStr { SECKEYPrivateKey *refPrivk; SECKEYPublicKey *pubkey; };
|
||||
|
||||
typedef struct KeyPairStr KeyPair;
|
||||
|
||||
|
@ -1123,15 +1120,16 @@ KeyOut(const char *keyoutfile,
|
|||
int rv = SECSuccess;
|
||||
|
||||
do {
|
||||
/* get the password from the file */
|
||||
/* Caller wants an encrypted key. Get
|
||||
* the password from the file */
|
||||
if (key_pwd_file) {
|
||||
if (!GetKeyPassword(key_pwd_file, &pwitem)) {
|
||||
return 255;
|
||||
}
|
||||
} else {
|
||||
/* No password file indicates the caller wants clear keys.
|
||||
* Make up a dummy password to get NSS to export an encrypted
|
||||
* key and then decrypt it
|
||||
/* Caller wants clear keys. Make up a dummy
|
||||
* password to get NSS to export an encrypted
|
||||
* key which we will decrypt.
|
||||
*/
|
||||
rv = PK11_GenerateRandom(randomPassword, PRAND_PASS_LEN);
|
||||
if (rv != SECSuccess) GEN_BREAK(rv);
|
||||
|
@ -1206,9 +1204,7 @@ KeyOut(const char *keyoutfile,
|
|||
if (numBytes != derEPKI->len) {
|
||||
printf("Wrote %d bytes, instead of %d\n", numBytes, derPKI->len);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
printf("Wrote %d bytes of encoded data to %s \n", numBytes, keyoutfile);
|
||||
|
@ -1447,7 +1443,7 @@ shutdown:
|
|||
}
|
||||
}
|
||||
|
||||
/* $Id: keyutil.c,v 1.1 2008/05/01 01:06:25 emaldonado Exp $ */
|
||||
/* $Id: keyutil.c,v 1.2 2008/05/02 23:42:20 emaldonado Exp $ */
|
||||
|
||||
/* Key generation, encryption, and certificate utility code, based on
|
||||
* code from NSS's security utilities and the certutil application.
|
||||
|
@ -1581,8 +1577,6 @@ int main(int argc, char **argv)
|
|||
|
||||
switch (cmd) {
|
||||
case cmd_CertReq:
|
||||
/* FIXME Remove when done debugging */
|
||||
printf("\ncmd_CertReq\n");
|
||||
/* certfile NULL signals only the request is needed */
|
||||
rv = keyutil_main(certHandle,
|
||||
noisefile, access_pwd_file, key_pwd_file,
|
||||
|
@ -1590,7 +1584,6 @@ int main(int argc, char **argv)
|
|||
ascii, outfile, NULL, keyoutfile);
|
||||
break;
|
||||
case cmd_CreateNewCert:
|
||||
printf("\ncmd_CreateNewCert\n");
|
||||
rv = keyutil_main(certHandle,
|
||||
noisefile, access_pwd_file, key_pwd_file,
|
||||
subject, keysize, warpmonths, validity_months,
|
||||
|
|
Loading…
Reference in New Issue