]>
git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/parseCrl/parseCrl.cpp
2 * parseCrl.cpp - CL-based cert parser.
4 * See oidParser.h for info on config file.
6 #include <security_cdsa_utils/cuPrintCert.h>
7 #include <security_cdsa_utils/cuFileIo.h>
12 static void usage(char **argv
)
14 printf("Usage: %s crlFile [l=loops]\n", argv
[0]);
18 int main(int argc
, char **argv
)
20 unsigned char *rawCrl
= NULL
;
25 CSSM_BOOL verbose
= CSSM_FALSE
;
31 for(int arg
=2; arg
<argc
; arg
++) {
32 switch(argv
[arg
][0]) {
34 loops
= atoi(&argv
[arg
][2]);
44 rtn
= readFile(argv
[1], &rawCrl
, &rawCrlSize
);
46 printf("Error reading %s; %s\n", argv
[1], strerror(rtn
));
50 /* optional loop for malloc debug */
51 for(loop
=0; loop
<loops
; loop
++) {
52 printCrl(rawCrl
, rawCrlSize
, verbose
);
55 printf("CR to continue, q to quit: ");