Mercurial > trustbridge > nss-cmake-static
comparison nss/lib/pki/pkistore.h @ 0:1e5118fa0cb1
This is NSS with a Cmake Buildsyste
To compile a static NSS library for Windows we've used the
Chromium-NSS fork and added a Cmake buildsystem to compile
it statically for Windows. See README.chromium for chromium
changes and README.trustbridge for our modifications.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 28 Jul 2014 10:47:06 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1e5118fa0cb1 |
---|---|
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 #ifndef PKISTORE_H | |
6 #define PKISTORE_H | |
7 | |
8 #ifndef NSSPKIT_H | |
9 #include "nsspkit.h" | |
10 #endif /* NSSPKIT_H */ | |
11 | |
12 #ifndef BASE_H | |
13 #include "base.h" | |
14 #endif /* BASE_H */ | |
15 | |
16 PR_BEGIN_EXTERN_C | |
17 | |
18 /* | |
19 * PKI Stores | |
20 * | |
21 * This is a set of routines for managing local stores of PKI objects. | |
22 * Currently, the only application is in crypto contexts, where the | |
23 * certificate store is used. In the future, methods should be added | |
24 * here for storing local references to keys. | |
25 */ | |
26 | |
27 /* | |
28 * nssCertificateStore | |
29 * | |
30 * Manages local store of certificate, trust, and S/MIME profile objects. | |
31 * Within a crypto context, mappings of cert to trust and cert to S/MIME | |
32 * profile are always 1-1. Therefore, it is reasonable to store all objects | |
33 * in a single collection, indexed by the certificate. | |
34 */ | |
35 | |
36 NSS_EXTERN nssCertificateStore * | |
37 nssCertificateStore_Create | |
38 ( | |
39 NSSArena *arenaOpt | |
40 ); | |
41 | |
42 NSS_EXTERN PRStatus | |
43 nssCertificateStore_Destroy | |
44 ( | |
45 nssCertificateStore *store | |
46 ); | |
47 | |
48 /* Atomic Find cert in store, or add this cert to the store. | |
49 ** Ref counts properly maintained. | |
50 */ | |
51 NSS_EXTERN NSSCertificate * | |
52 nssCertificateStore_FindOrAdd | |
53 ( | |
54 nssCertificateStore *store, | |
55 NSSCertificate *c | |
56 ); | |
57 | |
58 NSS_EXTERN void | |
59 nssCertificateStore_RemoveCertLOCKED | |
60 ( | |
61 nssCertificateStore *store, | |
62 NSSCertificate *cert | |
63 ); | |
64 | |
65 struct nssCertificateStoreTraceStr { | |
66 nssCertificateStore* store; | |
67 PZLock* lock; | |
68 PRBool locked; | |
69 PRBool unlocked; | |
70 }; | |
71 | |
72 typedef struct nssCertificateStoreTraceStr nssCertificateStoreTrace; | |
73 | |
74 NSS_EXTERN void | |
75 nssCertificateStore_Lock ( | |
76 nssCertificateStore *store, nssCertificateStoreTrace* out | |
77 ); | |
78 | |
79 NSS_EXTERN void | |
80 nssCertificateStore_Unlock ( | |
81 nssCertificateStore *store, const nssCertificateStoreTrace* in, | |
82 nssCertificateStoreTrace* out | |
83 ); | |
84 | |
85 NSS_EXTERN NSSCertificate ** | |
86 nssCertificateStore_FindCertificatesBySubject | |
87 ( | |
88 nssCertificateStore *store, | |
89 NSSDER *subject, | |
90 NSSCertificate *rvOpt[], | |
91 PRUint32 maximumOpt, | |
92 NSSArena *arenaOpt | |
93 ); | |
94 | |
95 NSS_EXTERN NSSCertificate ** | |
96 nssCertificateStore_FindCertificatesByNickname | |
97 ( | |
98 nssCertificateStore *store, | |
99 const NSSUTF8 *nickname, | |
100 NSSCertificate *rvOpt[], | |
101 PRUint32 maximumOpt, | |
102 NSSArena *arenaOpt | |
103 ); | |
104 | |
105 NSS_EXTERN NSSCertificate ** | |
106 nssCertificateStore_FindCertificatesByEmail | |
107 ( | |
108 nssCertificateStore *store, | |
109 NSSASCII7 *email, | |
110 NSSCertificate *rvOpt[], | |
111 PRUint32 maximumOpt, | |
112 NSSArena *arenaOpt | |
113 ); | |
114 | |
115 NSS_EXTERN NSSCertificate * | |
116 nssCertificateStore_FindCertificateByIssuerAndSerialNumber | |
117 ( | |
118 nssCertificateStore *store, | |
119 NSSDER *issuer, | |
120 NSSDER *serial | |
121 ); | |
122 | |
123 NSS_EXTERN NSSCertificate * | |
124 nssCertificateStore_FindCertificateByEncodedCertificate | |
125 ( | |
126 nssCertificateStore *store, | |
127 NSSDER *encoding | |
128 ); | |
129 | |
130 NSS_EXTERN PRStatus | |
131 nssCertificateStore_AddTrust | |
132 ( | |
133 nssCertificateStore *store, | |
134 NSSTrust *trust | |
135 ); | |
136 | |
137 NSS_EXTERN NSSTrust * | |
138 nssCertificateStore_FindTrustForCertificate | |
139 ( | |
140 nssCertificateStore *store, | |
141 NSSCertificate *cert | |
142 ); | |
143 | |
144 NSS_EXTERN PRStatus | |
145 nssCertificateStore_AddSMIMEProfile | |
146 ( | |
147 nssCertificateStore *store, | |
148 nssSMIMEProfile *profile | |
149 ); | |
150 | |
151 NSS_EXTERN nssSMIMEProfile * | |
152 nssCertificateStore_FindSMIMEProfileForCertificate | |
153 ( | |
154 nssCertificateStore *store, | |
155 NSSCertificate *cert | |
156 ); | |
157 | |
158 NSS_EXTERN void | |
159 nssCertificateStore_DumpStoreInfo | |
160 ( | |
161 nssCertificateStore *store, | |
162 void (* cert_dump_iter)(const void *, void *, void *), | |
163 void *arg | |
164 ); | |
165 | |
166 PR_END_EXTERN_C | |
167 | |
168 #endif /* PKISTORE_H */ |