comparison nss/lib/dev/devm.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 DEVM_H
6 #define DEVM_H
7
8 #ifndef BASE_H
9 #include "base.h"
10 #endif /* BASE_H */
11
12 #ifndef DEV_H
13 #include "dev.h"
14 #endif /* DEV_H */
15
16 #ifndef DEVTM_H
17 #include "devtm.h"
18 #endif /* DEVTM_H */
19
20 PR_BEGIN_EXTERN_C
21
22 /* Shortcut to cryptoki API functions. */
23 #define CKAPI(epv) \
24 ((CK_FUNCTION_LIST_PTR)(epv))
25
26 NSS_EXTERN void
27 nssDevice_AddRef
28 (
29 struct nssDeviceBaseStr *device
30 );
31
32 NSS_EXTERN PRBool
33 nssDevice_Destroy
34 (
35 struct nssDeviceBaseStr *device
36 );
37
38 NSS_EXTERN PRBool
39 nssModule_IsThreadSafe
40 (
41 NSSModule *module
42 );
43
44 NSS_EXTERN PRBool
45 nssModule_IsInternal
46 (
47 NSSModule *mod
48 );
49
50 NSS_EXTERN PRBool
51 nssModule_IsModuleDBOnly
52 (
53 NSSModule *mod
54 );
55
56 NSS_EXTERN void *
57 nssModule_GetCryptokiEPV
58 (
59 NSSModule *mod
60 );
61
62 NSS_EXTERN NSSSlot *
63 nssSlot_Create
64 (
65 CK_SLOT_ID slotId,
66 NSSModule *parent
67 );
68
69 NSS_EXTERN void *
70 nssSlot_GetCryptokiEPV
71 (
72 NSSSlot *slot
73 );
74
75 NSS_EXTERN NSSToken *
76 nssToken_Create
77 (
78 CK_SLOT_ID slotID,
79 NSSSlot *peer
80 );
81
82 NSS_EXTERN void *
83 nssToken_GetCryptokiEPV
84 (
85 NSSToken *token
86 );
87
88 NSS_EXTERN nssSession *
89 nssToken_GetDefaultSession
90 (
91 NSSToken *token
92 );
93
94 NSS_EXTERN PRBool
95 nssToken_IsLoginRequired
96 (
97 NSSToken *token
98 );
99
100 NSS_EXTERN void
101 nssToken_Remove
102 (
103 NSSToken *token
104 );
105
106 NSS_EXTERN nssCryptokiObject *
107 nssCryptokiObject_Create
108 (
109 NSSToken *t,
110 nssSession *session,
111 CK_OBJECT_HANDLE h
112 );
113
114 NSS_EXTERN nssTokenObjectCache *
115 nssTokenObjectCache_Create
116 (
117 NSSToken *token,
118 PRBool cacheCerts,
119 PRBool cacheTrust,
120 PRBool cacheCRLs
121 );
122
123 NSS_EXTERN void
124 nssTokenObjectCache_Destroy
125 (
126 nssTokenObjectCache *cache
127 );
128
129 NSS_EXTERN void
130 nssTokenObjectCache_Clear
131 (
132 nssTokenObjectCache *cache
133 );
134
135 NSS_EXTERN PRBool
136 nssTokenObjectCache_HaveObjectClass
137 (
138 nssTokenObjectCache *cache,
139 CK_OBJECT_CLASS objclass
140 );
141
142 NSS_EXTERN nssCryptokiObject **
143 nssTokenObjectCache_FindObjectsByTemplate
144 (
145 nssTokenObjectCache *cache,
146 CK_OBJECT_CLASS objclass,
147 CK_ATTRIBUTE_PTR otemplate,
148 CK_ULONG otlen,
149 PRUint32 maximumOpt,
150 PRStatus *statusOpt
151 );
152
153 NSS_EXTERN PRStatus
154 nssTokenObjectCache_GetObjectAttributes
155 (
156 nssTokenObjectCache *cache,
157 NSSArena *arenaOpt,
158 nssCryptokiObject *object,
159 CK_OBJECT_CLASS objclass,
160 CK_ATTRIBUTE_PTR atemplate,
161 CK_ULONG atlen
162 );
163
164 NSS_EXTERN PRStatus
165 nssTokenObjectCache_ImportObject
166 (
167 nssTokenObjectCache *cache,
168 nssCryptokiObject *object,
169 CK_OBJECT_CLASS objclass,
170 CK_ATTRIBUTE_PTR ot,
171 CK_ULONG otlen
172 );
173
174 NSS_EXTERN void
175 nssTokenObjectCache_RemoveObject
176 (
177 nssTokenObjectCache *cache,
178 nssCryptokiObject *object
179 );
180
181 /* XXX allows peek back into token */
182 NSS_EXTERN PRStatus
183 nssToken_GetCachedObjectAttributes
184 (
185 NSSToken *token,
186 NSSArena *arenaOpt,
187 nssCryptokiObject *object,
188 CK_OBJECT_CLASS objclass,
189 CK_ATTRIBUTE_PTR atemplate,
190 CK_ULONG atlen
191 );
192
193 /* PKCS#11 stores strings in a fixed-length buffer padded with spaces. This
194 * function gets the length of the actual string.
195 */
196 NSS_EXTERN PRUint32
197 nssPKCS11String_Length
198 (
199 CK_CHAR *pkcs11str,
200 PRUint32 bufLen
201 );
202
203 PR_END_EXTERN_C
204
205 #endif /* DEV_H */
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)