diff --git a/security/nss/cmd/crlutil/crlutil.c b/security/nss/cmd/crlutil/crlutil.c index 06e1fa3844b6..dd7f70f9810b 100644 --- a/security/nss/cmd/crlutil/crlutil.c +++ b/security/nss/cmd/crlutil/crlutil.c @@ -289,6 +289,7 @@ static void Usage(char *progName) fprintf(stderr, "%-20s \t 1 - SEC_CRL_TYPE\n", " "); fprintf(stderr, "\n%-20s Bypass CA certificate checks.\n", "-B"); fprintf(stderr, "\n%-20s Partial decode for faster operation.\n", "-p"); + fprintf(stderr, "%-20s Repeat the operation.\n", "-r "); exit(-1); } @@ -315,6 +316,8 @@ int main(int argc, char **argv) PRInt32 importOptions = CRL_IMPORT_DEFAULT_OPTIONS; PRBool test = PR_FALSE; PRBool erase = PR_FALSE; + PRInt32 i = 0; + PRInt32 iterations = 1; progName = strrchr(argv[0], '/'); progName = progName ? progName+1 : argv[0]; @@ -330,7 +333,7 @@ int main(int argc, char **argv) /* * Parse command line arguments */ - optstate = PL_CreateOptState(argc, argv, "BCDILP:d:i:n:pt:u:TE"); + optstate = PL_CreateOptState(argc, argv, "BCDILP:d:i:n:pt:u:TEr:"); while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) { switch (optstate->option) { case '?': @@ -390,6 +393,13 @@ int main(int argc, char **argv) case 'p': decodeOptions |= CRL_DECODE_SKIP_ENTRIES; break; + + case 'r': { + const char* str = optstate->value; + if (str && atoi(str)>0) + iterations = atoi(str); + } + break; case 't': { char *type; @@ -429,34 +439,34 @@ int main(int argc, char **argv) return (-1); } - /* Read in the private key info */ - if (deleteCRL) - DeleteCRL (certHandle, nickName, crlType); - else if (listCRL) { - int i = 0; - for (i=0; i<10; i++) + for (i=0; i