summaryrefslogtreecommitdiffstats
path: root/security/nss/cmd/libpkix/testutil/testutil_nss.h
blob: e1f24af89d58fb53b2c709bbbddefead9ad0525f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
 * testutil_nss.h
 *
 * NSS-specific utility functions for handling test errors
 *
 */

#ifndef _TESTUTIL_NSS_H
#define _TESTUTIL_NSS_H

#include "pkix_tools.h"
#include "plstr.h"
#include "prprf.h"
#include "prlong.h"
#include "secutil.h"
#include <stdio.h>
#include <ctype.h>

#ifdef __cplusplus
extern "C" {
#endif

#include "pkix_pl_generalname.h"

/* see source file for function documentation */

PKIX_PL_Cert *
createCert(
    char *dirName,
    char *certFile,
    void *plContext);

PKIX_PL_CRL *
createCRL(
    char *dirName,
    char *crlFileName,
    void *plContext);

PKIX_TrustAnchor *
createTrustAnchor(
    char *dirName,
    char *taFileName,
    PKIX_Boolean useCert,
    void *plContext);

PKIX_List *
createCertChain(
    char *dirName,
    char *firstCertFileName,
    char *secondCertFileName,
    void *plContext);

PKIX_List *
createCertChainPlus(
    char *dirName,
    char *certNames[],
    PKIX_PL_Cert *certs[],
    PKIX_UInt32 numCerts,
    void *plContext);

PKIX_PL_Date *
createDate(
    char *asciiDate,
    void *plContext);

PKIX_ProcessingParams *
createProcessingParams(
    char *dirName,
    char *firstAnchorFileName,
    char *secondAnchorFileName,
    char *dateAscii,
    PKIX_List *initialPolicies, /* List of PKIX_PL_OID */
    PKIX_Boolean isCrlEnabled,
    void *plContext);

PKIX_ValidateParams *
createValidateParams(
    char *dirName,
    char *firstAnchorFileName,
    char *secondAnchorFileName,
    char *dateAscii,
    PKIX_List *initialPolicies, /* List of PKIX_PL_OID */
    PKIX_Boolean initialPolicyMappingInhibit,
    PKIX_Boolean initialAnyPolicyInhibit,
    PKIX_Boolean initialExplicitPolicy,
    PKIX_Boolean isCrlEnabled,
    PKIX_List *chain,
    void *plContext);

PKIX_ValidateResult *
createValidateResult(
    char *dirName,
    char *anchorFileName,
    char *pubKeyCertFileName,
    void *plContext);

PKIX_BuildResult *
createBuildResult(
    char *dirName,
    char *anchorFileName,
    char *pubKeyCertFileName,
    char *firstChainCertFileName,
    char *secondChainCertFileName,
    void *plContext);

PKIX_PL_GeneralName *
createGeneralName(
    PKIX_UInt32 nameType,
    char *asciiName,
    void *plContext);

#ifdef __cplusplus
}
#endif

#endif /* TESTUTIL_NSS_H */