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