]>
git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/p12Parse/main.cpp
2 * standalone pkcs12 parser.
4 #include <security_cdsa_utils/cuFileIo.h>
7 #include <CoreFoundation/CoreFoundation.h>
9 #include <security_cdsa_utils/cuCdsaUtils.h>
11 static void usage(char **argv
)
13 printf("Usage: %s infile password [v(erbose)\n", argv
[0]);
17 int main(int argc
, char **argv
)
20 CFStringRef pwd
= NULL
;
26 for(int arg
=3; arg
<argc
; arg
++) {
27 char *argp
= argv
[arg
];
40 if(readFile(inFile
, &rawBlob
.Data
, &len
)) {
41 printf("***Error reading %s. Aborting.\n", inFile
);
45 pwd
= CFStringCreateWithCString(NULL
, argv
[2], kCFStringEncodingASCII
);
47 CSSM_CSP_HANDLE cspHand
= cuCspStartup(CSSM_TRUE
);
48 int rtn
= p12ParseTop(rawBlob
, cspHand
, pwd
, verbose
);