|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 /* |
|
5 * dumpcert.c |
|
6 * |
|
7 * dump certificate sample application |
|
8 * |
|
9 */ |
|
10 |
|
11 #include <stdio.h> |
|
12 |
|
13 #include "pkix.h" |
|
14 #include "pkixt.h" |
|
15 #include "pkix_error.h" |
|
16 |
|
17 #undef PKIX_ERRORENTRY |
|
18 #define PKIX_ERRORENTRY(name,desc,plerr) #name |
|
19 |
|
20 const char * const PKIX_ErrorNames[] = |
|
21 { |
|
22 #include "pkix_errorstrings.h" |
|
23 }; |
|
24 |
|
25 #undef PKIX_ERRORENTRY |
|
26 |
|
27 |
|
28 int |
|
29 main(int argc, char **argv) |
|
30 { |
|
31 int i = 0; |
|
32 for (; i < PKIX_NUMERRORCODES; ++i) { |
|
33 printf("code %d %s\n", i, PKIX_ErrorNames[i]); |
|
34 } |
|
35 return 0; |
|
36 } |