@@ -602,9 +602,30 @@ var inventoryFixRFPKCS12 = &cobra.Command{
602602 Use : "fixrfpkcs12" ,
603603 Aliases : nil ,
604604 SuggestFor : nil ,
605- Short : "Fix RFPKCS12 stores that contain 2 or more leaf certificates, by removing the certificate with the earliest issued date." ,
606- GroupID : "" ,
607- Long : `Fix RFPKCS12 stores that contain 2 or more leaf certificates, by removing the certificate with the earliest issued date.` ,
605+ Short : "Fix RFPKCS12 stores that contain 2 or more leaf certificates. " +
606+ "This will remove all but the most recently issued certificate based on certificate `NotBefore` information." ,
607+ GroupID : "" ,
608+ Long : `Fix RFPKCS12 stores that contain 2 or more leaf certificates.
609+ This will *remove all but the most recently issued certificate* based on certificate 'NotBefore' information.
610+ The command will output a CSV file with the following columns:
611+ - StoreId
612+ - StorePath
613+ - Action
614+ - Alias
615+ - IssuedDN
616+ - Thumbprint
617+ - IssuedDate
618+ - ExpiryDate
619+ - CertId
620+
621+ The 'Action' column will be set to 'REMOVE' for all certificates except the most recently issued certificate.
622+ The CSV file can be reviewed and modified and can be passed to the command with the --file option.
623+ The command will read the CSV file and schedule remove jobs as specified in the file where the 'Action' column is "REMOVE".
624+
625+ Alternatively the command can be run without the '--file' option if desired.
626+
627+ In both cases the '--force' flag is required to actually schedule the remove jobs for the certificates from the
628+ stores. This *cannot* be undone and should be used with caution.` ,
608629 Example : `
609630# The below will create a CSV file that can be reviewed and modified before running the command with the --file option.
610631kfutil stores inventory fixrfpkcs12 --exp
@@ -627,9 +648,7 @@ kfutil stores inventory fixrfpkcs12 --file rfpkcs12_fix.csv --force --exp
627648 PreRunE : nil ,
628649 Run : func (cmd * cobra.Command , args []string ) {
629650 force , _ := cmd .Flags ().GetBool ("force" )
630- //dryRun, _ := cmd.Flags().GetBool("dry-run")
631651 importFile , _ := cmd .Flags ().GetString ("file" )
632- //csvHeader := "Alias,Issued Date,Store Path,Client Machine,StoreId"
633652
634653 authConfig := createAuthConfigFromParams (kfcHostName , kfcUsername , kfcPassword , kfcDomain , kfcAPIPath )
635654 isExperimental := true
0 commit comments