option for printing content version

git-svn-id: svn://10.0.0.236/trunk@82283 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mcgreer%netscape.com
2000-11-03 22:28:26 +00:00
parent 8bfa642b7e
commit 52d2b6f439

View File

@@ -2011,7 +2011,8 @@ enum {
cmd_CreateAndAddCert,
cmd_ListModules,
cmd_CheckCertValidity,
cmd_ChangePassword
cmd_ChangePassword,
cmd_Version
};
/* Certutil options */
@@ -2067,7 +2068,8 @@ static secuCommandFlag certutil_commands[] =
{ /* cmd_CreateAndAddCert */ 'S', PR_FALSE, 0, PR_FALSE },
{ /* cmd_ListModules */ 'U', PR_FALSE, 0, PR_FALSE },
{ /* cmd_CheckCertValidity */ 'V', PR_FALSE, 0, PR_FALSE },
{ /* cmd_ChangePassword */ 'W', PR_FALSE, 0, PR_FALSE }
{ /* cmd_ChangePassword */ 'W', PR_FALSE, 0, PR_FALSE },
{ /* cmd_Version */ 'Y', PR_FALSE, 0, PR_FALSE }
};
static secuCommandFlag certutil_options[] =
@@ -2431,6 +2433,11 @@ main(int argc, char **argv)
keyHandle = SECKEY_GetDefaultKeyDB();
SECU_PKCS11Init(PR_FALSE);
if (certutil.commands[cmd_Version].activated) {
int version = CERT_GetDBContentVersion(certHandle);
printf("Certificate database content version: %d\n", version);
}
if (PL_strcmp(slotname, "internal") == 0)
slot = PK11_GetInternalKeySlot();
else if (slotname != NULL)