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