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 * testutil_nss.h | 5 * testutil_nss.h |
6 * | 6 * |
7 * NSS-specific utility functions for handling test errors | 7 * NSS-specific utility functions for handling test errors |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
11 #ifndef _TESTUTIL_NSS_H | 11 #ifndef _TESTUTIL_NSS_H |
12 #define _TESTUTIL_NSS_H | 12 #define _TESTUTIL_NSS_H |
13 | 13 |
14 #include "pkix_tools.h" | 14 #include "pkix_tools.h" |
15 #include "plstr.h" | 15 #include "plstr.h" |
16 #include "prprf.h" | 16 #include "prprf.h" |
17 #include "prlong.h" | 17 #include "prlong.h" |
18 #include "secutil.h" | 18 #include "secutil.h" |
19 #include <stdio.h> | 19 #include <stdio.h> |
20 #include <ctype.h> | 20 #include <ctype.h> |
21 | 21 |
22 #ifdef __cplusplus | 22 #ifdef __cplusplus |
23 extern "C" { | 23 extern "C" { |
24 #endif | 24 #endif |
25 | 25 |
26 #include "pkix_pl_generalname.h" | 26 #include "pkix_pl_generalname.h" |
27 | 27 |
28 /* see source file for function documentation */ | 28 /* see source file for function documentation */ |
29 | 29 |
30 PKIX_PL_Cert * | 30 PKIX_PL_Cert *createCert(char *dirName, char *certFile, void *plContext); |
31 createCert( | |
32 char *dirName, | |
33 char *certFile, | |
34 void *plContext); | |
35 | 31 |
36 PKIX_PL_CRL * | 32 PKIX_PL_CRL *createCRL(char *dirName, char *crlFileName, void *plContext); |
37 createCRL( | |
38 char *dirName, | |
39 char *crlFileName, | |
40 void *plContext); | |
41 | 33 |
42 PKIX_TrustAnchor * | 34 PKIX_TrustAnchor *createTrustAnchor(char *dirName, char *taFileName, |
43 createTrustAnchor( | 35 PKIX_Boolean useCert, void *plContext); |
44 char *dirName, | |
45 char *taFileName, | |
46 PKIX_Boolean useCert, | |
47 void *plContext); | |
48 | 36 |
49 PKIX_List * | 37 PKIX_List *createCertChain(char *dirName, char *firstCertFileName, |
50 createCertChain( | 38 char *secondCertFileName, void *plContext); |
51 char *dirName, | |
52 char *firstCertFileName, | |
53 char *secondCertFileName, | |
54 void *plContext); | |
55 | 39 |
56 PKIX_List * | 40 PKIX_List *createCertChainPlus(char *dirName, char *certNames[], |
57 createCertChainPlus( | 41 PKIX_PL_Cert *certs[], PKIX_UInt32 numCerts, |
58 char *dirName, | 42 void *plContext); |
59 char *certNames[], | |
60 PKIX_PL_Cert *certs[], | |
61 PKIX_UInt32 numCerts, | |
62 void *plContext); | |
63 | 43 |
64 PKIX_PL_Date * | 44 PKIX_PL_Date *createDate(char *asciiDate, void *plContext); |
65 createDate( | |
66 char *asciiDate, | |
67 void *plContext); | |
68 | 45 |
| 46 PKIX_ProcessingParams *createProcessingParams( |
| 47 char *dirName, char *firstAnchorFileName, char *secondAnchorFileName, |
| 48 char *dateAscii, PKIX_List *initialPolicies, /* List of PKIX_PL_OID */ |
| 49 PKIX_Boolean isCrlEnabled, void *plContext); |
69 | 50 |
70 PKIX_ProcessingParams * | 51 PKIX_ValidateParams *createValidateParams( |
71 createProcessingParams( | 52 char *dirName, char *firstAnchorFileName, char *secondAnchorFileName, |
72 char *dirName, | 53 char *dateAscii, PKIX_List *initialPolicies, /* List of PKIX_PL_OID */ |
73 char *firstAnchorFileName, | 54 PKIX_Boolean initialPolicyMappingInhibit, |
74 char *secondAnchorFileName, | 55 PKIX_Boolean initialAnyPolicyInhibit, PKIX_Boolean initialExplicitPolicy, |
75 char *dateAscii, | 56 PKIX_Boolean isCrlEnabled, PKIX_List *chain, void *plContext); |
76 PKIX_List *initialPolicies, /* List of PKIX_PL_OID */ | |
77 PKIX_Boolean isCrlEnabled, | |
78 void *plContext); | |
79 | 57 |
80 PKIX_ValidateParams * | 58 PKIX_ValidateResult *createValidateResult(char *dirName, char *anchorFileName, |
81 createValidateParams( | 59 char *pubKeyCertFileName, |
82 char *dirName, | 60 void *plContext); |
83 char *firstAnchorFileName, | |
84 char *secondAnchorFileName, | |
85 char *dateAscii, | |
86 PKIX_List *initialPolicies, /* List of PKIX_PL_OID */ | |
87 PKIX_Boolean initialPolicyMappingInhibit, | |
88 PKIX_Boolean initialAnyPolicyInhibit, | |
89 PKIX_Boolean initialExplicitPolicy, | |
90 PKIX_Boolean isCrlEnabled, | |
91 PKIX_List *chain, | |
92 void *plContext); | |
93 | 61 |
94 PKIX_ValidateResult * | 62 PKIX_BuildResult *createBuildResult(char *dirName, char *anchorFileName, |
95 createValidateResult( | 63 char *pubKeyCertFileName, |
96 char *dirName, | 64 char *firstChainCertFileName, |
97 char *anchorFileName, | 65 char *secondChainCertFileName, |
98 char *pubKeyCertFileName, | 66 void *plContext); |
99 void *plContext); | |
100 | 67 |
101 PKIX_BuildResult * | 68 PKIX_PL_GeneralName *createGeneralName(PKIX_UInt32 nameType, char *asciiName, |
102 createBuildResult( | 69 void *plContext); |
103 char *dirName, | |
104 char *anchorFileName, | |
105 char *pubKeyCertFileName, | |
106 char *firstChainCertFileName, | |
107 char *secondChainCertFileName, | |
108 void *plContext); | |
109 | |
110 PKIX_PL_GeneralName * | |
111 createGeneralName( | |
112 PKIX_UInt32 nameType, | |
113 char *asciiName, | |
114 void *plContext); | |
115 | 70 |
116 #ifdef __cplusplus | 71 #ifdef __cplusplus |
117 } | 72 } |
118 #endif | 73 #endif |
119 | 74 |
120 #endif /* TESTUTIL_NSS_H */ | 75 #endif /* TESTUTIL_NSS_H */ |
OLD | NEW |