comparison nss/lib/util/pkcs11n.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 _PKCS11N_H_
6 #define _PKCS11N_H_
7
8 /*
9 * pkcs11n.h
10 *
11 * This file contains the NSS-specific type definitions for Cryptoki
12 * (PKCS#11).
13 */
14
15 /*
16 * NSSCK_VENDOR_NSS
17 *
18 * Cryptoki reserves the high half of all the number spaces for
19 * vendor-defined use. I'd like to keep all of our NSS-
20 * specific values together, but not in the oh-so-obvious
21 * 0x80000001, 0x80000002, etc. area. So I've picked an offset,
22 * and constructed values for the beginnings of our spaces.
23 *
24 * Note that some "historical" Netscape values don't fall within
25 * this range.
26 */
27 #define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
28
29 /*
30 * NSS-defined object classes
31 *
32 */
33 #define CKO_NSS (CKO_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
34
35 #define CKO_NSS_CRL (CKO_NSS + 1)
36 #define CKO_NSS_SMIME (CKO_NSS + 2)
37 #define CKO_NSS_TRUST (CKO_NSS + 3)
38 #define CKO_NSS_BUILTIN_ROOT_LIST (CKO_NSS + 4)
39 #define CKO_NSS_NEWSLOT (CKO_NSS + 5)
40 #define CKO_NSS_DELSLOT (CKO_NSS + 6)
41
42
43 /*
44 * NSS-defined key types
45 *
46 */
47 #define CKK_NSS (CKK_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
48
49 #define CKK_NSS_PKCS8 (CKK_NSS + 1)
50
51 #define CKK_NSS_JPAKE_ROUND1 (CKK_NSS + 2)
52 #define CKK_NSS_JPAKE_ROUND2 (CKK_NSS + 3)
53
54 #define CKK_NSS_CHACHA20 (CKK_NSS + 4)
55
56 /*
57 * NSS-defined certificate types
58 *
59 */
60 #define CKC_NSS (CKC_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
61
62 /* FAKE PKCS #11 defines */
63 #define CKA_DIGEST 0x81000000L
64 #define CKA_FLAGS_ONLY 0 /* CKA_CLASS */
65
66 /*
67 * NSS-defined object attributes
68 *
69 */
70 #define CKA_NSS (CKA_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
71
72 #define CKA_NSS_URL (CKA_NSS + 1)
73 #define CKA_NSS_EMAIL (CKA_NSS + 2)
74 #define CKA_NSS_SMIME_INFO (CKA_NSS + 3)
75 #define CKA_NSS_SMIME_TIMESTAMP (CKA_NSS + 4)
76 #define CKA_NSS_PKCS8_SALT (CKA_NSS + 5)
77 #define CKA_NSS_PASSWORD_CHECK (CKA_NSS + 6)
78 #define CKA_NSS_EXPIRES (CKA_NSS + 7)
79 #define CKA_NSS_KRL (CKA_NSS + 8)
80
81 #define CKA_NSS_PQG_COUNTER (CKA_NSS + 20)
82 #define CKA_NSS_PQG_SEED (CKA_NSS + 21)
83 #define CKA_NSS_PQG_H (CKA_NSS + 22)
84 #define CKA_NSS_PQG_SEED_BITS (CKA_NSS + 23)
85 #define CKA_NSS_MODULE_SPEC (CKA_NSS + 24)
86 #define CKA_NSS_OVERRIDE_EXTENSIONS (CKA_NSS + 25)
87
88 #define CKA_NSS_JPAKE_SIGNERID (CKA_NSS + 26)
89 #define CKA_NSS_JPAKE_PEERID (CKA_NSS + 27)
90 #define CKA_NSS_JPAKE_GX1 (CKA_NSS + 28)
91 #define CKA_NSS_JPAKE_GX2 (CKA_NSS + 29)
92 #define CKA_NSS_JPAKE_GX3 (CKA_NSS + 30)
93 #define CKA_NSS_JPAKE_GX4 (CKA_NSS + 31)
94 #define CKA_NSS_JPAKE_X2 (CKA_NSS + 32)
95 #define CKA_NSS_JPAKE_X2S (CKA_NSS + 33)
96
97 /*
98 * Trust attributes:
99 *
100 * If trust goes standard, these probably will too. So I'll
101 * put them all in one place.
102 */
103
104 #define CKA_TRUST (CKA_NSS + 0x2000)
105
106 /* "Usage" key information */
107 #define CKA_TRUST_DIGITAL_SIGNATURE (CKA_TRUST + 1)
108 #define CKA_TRUST_NON_REPUDIATION (CKA_TRUST + 2)
109 #define CKA_TRUST_KEY_ENCIPHERMENT (CKA_TRUST + 3)
110 #define CKA_TRUST_DATA_ENCIPHERMENT (CKA_TRUST + 4)
111 #define CKA_TRUST_KEY_AGREEMENT (CKA_TRUST + 5)
112 #define CKA_TRUST_KEY_CERT_SIGN (CKA_TRUST + 6)
113 #define CKA_TRUST_CRL_SIGN (CKA_TRUST + 7)
114
115 /* "Purpose" trust information */
116 #define CKA_TRUST_SERVER_AUTH (CKA_TRUST + 8)
117 #define CKA_TRUST_CLIENT_AUTH (CKA_TRUST + 9)
118 #define CKA_TRUST_CODE_SIGNING (CKA_TRUST + 10)
119 #define CKA_TRUST_EMAIL_PROTECTION (CKA_TRUST + 11)
120 #define CKA_TRUST_IPSEC_END_SYSTEM (CKA_TRUST + 12)
121 #define CKA_TRUST_IPSEC_TUNNEL (CKA_TRUST + 13)
122 #define CKA_TRUST_IPSEC_USER (CKA_TRUST + 14)
123 #define CKA_TRUST_TIME_STAMPING (CKA_TRUST + 15)
124 #define CKA_TRUST_STEP_UP_APPROVED (CKA_TRUST + 16)
125
126 #define CKA_CERT_SHA1_HASH (CKA_TRUST + 100)
127 #define CKA_CERT_MD5_HASH (CKA_TRUST + 101)
128
129 /* NSS trust stuff */
130
131 /* HISTORICAL: define used to pass in the database key for DSA private keys */
132 #define CKA_NETSCAPE_DB 0xD5A0DB00L
133 #define CKA_NETSCAPE_TRUST 0x80000001L
134
135 /* FAKE PKCS #11 defines */
136 #define CKM_FAKE_RANDOM 0x80000efeUL
137 #define CKM_INVALID_MECHANISM 0xffffffffUL
138
139 /*
140 * NSS-defined crypto mechanisms
141 *
142 */
143 #define CKM_NSS (CKM_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
144
145 #define CKM_NSS_AES_KEY_WRAP (CKM_NSS + 1)
146 #define CKM_NSS_AES_KEY_WRAP_PAD (CKM_NSS + 2)
147
148 /* HKDF key derivation mechanisms. See CK_NSS_HKDFParams for documentation. */
149 #define CKM_NSS_HKDF_SHA1 (CKM_NSS + 3)
150 #define CKM_NSS_HKDF_SHA256 (CKM_NSS + 4)
151 #define CKM_NSS_HKDF_SHA384 (CKM_NSS + 5)
152 #define CKM_NSS_HKDF_SHA512 (CKM_NSS + 6)
153
154 /* J-PAKE round 1 key generation mechanisms.
155 *
156 * Required template attributes: CKA_PRIME, CKA_SUBPRIME, CKA_BASE,
157 * CKA_NSS_JPAKE_SIGNERID
158 * Output key type: CKK_NSS_JPAKE_ROUND1
159 * Output key class: CKO_PRIVATE_KEY
160 * Parameter type: CK_NSS_JPAKERound1Params
161 *
162 */
163 #define CKM_NSS_JPAKE_ROUND1_SHA1 (CKM_NSS + 7)
164 #define CKM_NSS_JPAKE_ROUND1_SHA256 (CKM_NSS + 8)
165 #define CKM_NSS_JPAKE_ROUND1_SHA384 (CKM_NSS + 9)
166 #define CKM_NSS_JPAKE_ROUND1_SHA512 (CKM_NSS + 10)
167
168 /* J-PAKE round 2 key derivation mechanisms.
169 *
170 * Required template attributes: CKA_NSS_JPAKE_PEERID
171 * Input key type: CKK_NSS_JPAKE_ROUND1
172 * Output key type: CKK_NSS_JPAKE_ROUND2
173 * Output key class: CKO_PRIVATE_KEY
174 * Parameter type: CK_NSS_JPAKERound2Params
175 */
176 #define CKM_NSS_JPAKE_ROUND2_SHA1 (CKM_NSS + 11)
177 #define CKM_NSS_JPAKE_ROUND2_SHA256 (CKM_NSS + 12)
178 #define CKM_NSS_JPAKE_ROUND2_SHA384 (CKM_NSS + 13)
179 #define CKM_NSS_JPAKE_ROUND2_SHA512 (CKM_NSS + 14)
180
181 /* J-PAKE final key material derivation mechanisms
182 *
183 * Input key type: CKK_NSS_JPAKE_ROUND2
184 * Output key type: CKK_GENERIC_SECRET
185 * Output key class: CKO_SECRET_KEY
186 * Parameter type: CK_NSS_JPAKEFinalParams
187 *
188 * You must apply a KDF (e.g. CKM_NSS_HKDF_*) to resultant keying material
189 * to get a key with uniformly distributed bits.
190 */
191 #define CKM_NSS_JPAKE_FINAL_SHA1 (CKM_NSS + 15)
192 #define CKM_NSS_JPAKE_FINAL_SHA256 (CKM_NSS + 16)
193 #define CKM_NSS_JPAKE_FINAL_SHA384 (CKM_NSS + 17)
194 #define CKM_NSS_JPAKE_FINAL_SHA512 (CKM_NSS + 18)
195
196 /* Constant-time MAC mechanisms:
197 *
198 * These operations verify a padded, MAC-then-encrypt block of data in
199 * constant-time. Because of the order of operations, the padding bytes are not
200 * protected by the MAC. However, disclosing the value of the padding bytes
201 * gives an attacker the ability to decrypt ciphertexts. Such disclosure can be
202 * as subtle as taking slightly less time to perform the MAC when the padding
203 * is one byte longer. See https://www.isg.rhul.ac.uk/tls/
204 *
205 * CKM_NSS_HMAC_CONSTANT_TIME: performs an HMAC authentication.
206 * CKM_NSS_SSL3_MAC_CONSTANT_TIME: performs an authentication with SSLv3 MAC.
207 *
208 * Parameter type: CK_NSS_MAC_CONSTANT_TIME_PARAMS
209 */
210 #define CKM_NSS_HMAC_CONSTANT_TIME (CKM_NSS + 19)
211 #define CKM_NSS_SSL3_MAC_CONSTANT_TIME (CKM_NSS + 20)
212
213 /* TLS 1.2 mechanisms */
214 #define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21)
215 #define CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256 (CKM_NSS + 22)
216 #define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23)
217 #define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24)
218
219 #define CKM_NSS_CHACHA20_KEY_GEN (CKM_NSS + 25)
220 #define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 26)
221
222 /*
223 * HISTORICAL:
224 * Do not attempt to use these. They are only used by NETSCAPE's internal
225 * PKCS #11 interface. Most of these are place holders for other mechanism
226 * and will change in the future.
227 */
228 #define CKM_NETSCAPE_PBE_SHA1_DES_CBC 0x80000002UL
229 #define CKM_NETSCAPE_PBE_SHA1_TRIPLE_DES_CBC 0x80000003UL
230 #define CKM_NETSCAPE_PBE_SHA1_40_BIT_RC2_CBC 0x80000004UL
231 #define CKM_NETSCAPE_PBE_SHA1_128_BIT_RC2_CBC 0x80000005UL
232 #define CKM_NETSCAPE_PBE_SHA1_40_BIT_RC4 0x80000006UL
233 #define CKM_NETSCAPE_PBE_SHA1_128_BIT_RC4 0x80000007UL
234 #define CKM_NETSCAPE_PBE_SHA1_FAULTY_3DES_CBC 0x80000008UL
235 #define CKM_NETSCAPE_PBE_SHA1_HMAC_KEY_GEN 0x80000009UL
236 #define CKM_NETSCAPE_PBE_MD5_HMAC_KEY_GEN 0x8000000aUL
237 #define CKM_NETSCAPE_PBE_MD2_HMAC_KEY_GEN 0x8000000bUL
238
239 #define CKM_TLS_PRF_GENERAL 0x80000373UL
240
241 typedef struct CK_NSS_JPAKEPublicValue {
242 CK_BYTE * pGX;
243 CK_ULONG ulGXLen;
244 CK_BYTE * pGV;
245 CK_ULONG ulGVLen;
246 CK_BYTE * pR;
247 CK_ULONG ulRLen;
248 } CK_NSS_JPAKEPublicValue;
249
250 typedef struct CK_NSS_JPAKERound1Params {
251 CK_NSS_JPAKEPublicValue gx1; /* out */
252 CK_NSS_JPAKEPublicValue gx2; /* out */
253 } CK_NSS_JPAKERound1Params;
254
255 typedef struct CK_NSS_JPAKERound2Params {
256 CK_BYTE * pSharedKey; /* in */
257 CK_ULONG ulSharedKeyLen; /* in */
258 CK_NSS_JPAKEPublicValue gx3; /* in */
259 CK_NSS_JPAKEPublicValue gx4; /* in */
260 CK_NSS_JPAKEPublicValue A; /* out */
261 } CK_NSS_JPAKERound2Params;
262
263 typedef struct CK_NSS_JPAKEFinalParams {
264 CK_NSS_JPAKEPublicValue B; /* in */
265 } CK_NSS_JPAKEFinalParams;
266
267 /* macAlg: the MAC algorithm to use. This determines the hash function used in
268 * the HMAC/SSLv3 MAC calculations.
269 * ulBodyTotalLen: the total length of the data, including padding bytes and
270 * padding length.
271 * pHeader: points to a block of data that contains additional data to
272 * authenticate. For TLS this includes the sequence number etc. For SSLv3,
273 * this also includes the initial padding bytes.
274 *
275 * NOTE: the softoken's implementation of CKM_NSS_HMAC_CONSTANT_TIME and
276 * CKM_NSS_SSL3_MAC_CONSTANT_TIME requires that the sum of ulBodyTotalLen
277 * and ulHeaderLen be much smaller than 2^32 / 8 bytes because it uses an
278 * unsigned int variable to represent the length in bits. This should not
279 * be a problem because the SSL/TLS protocol limits the size of an SSL
280 * record to something considerably less than 2^32 bytes.
281 */
282 typedef struct CK_NSS_MAC_CONSTANT_TIME_PARAMS {
283 CK_MECHANISM_TYPE macAlg; /* in */
284 CK_ULONG ulBodyTotalLen; /* in */
285 CK_BYTE * pHeader; /* in */
286 CK_ULONG ulHeaderLen; /* in */
287 } CK_NSS_MAC_CONSTANT_TIME_PARAMS;
288
289 typedef struct CK_NSS_AEAD_PARAMS {
290 CK_BYTE_PTR pIv; /* This is the nonce. */
291 CK_ULONG ulIvLen;
292 CK_BYTE_PTR pAAD;
293 CK_ULONG ulAADLen;
294 CK_ULONG ulTagLen;
295 } CK_NSS_AEAD_PARAMS;
296
297 /*
298 * NSS-defined return values
299 *
300 */
301 #define CKR_NSS (CKM_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
302
303 #define CKR_NSS_CERTDB_FAILED (CKR_NSS + 1)
304 #define CKR_NSS_KEYDB_FAILED (CKR_NSS + 2)
305
306 /* Mandatory parameter for the CKM_NSS_HKDF_* key deriviation mechanisms.
307 See RFC 5869.
308
309 bExtract: If set, HKDF-Extract will be applied to the input key. If
310 the optional salt is given, it is used; otherwise, the salt is
311 set to a sequence of zeros equal in length to the HMAC output.
312 If bExpand is not set, then the key template given to
313 C_DeriveKey must indicate an output key size less than or equal
314 to the output size of the HMAC.
315
316 bExpand: If set, HKDF-Expand will be applied to the input key (if
317 bExtract is not set) or to the result of HKDF-Extract (if
318 bExtract is set). Any info given in the optional pInfo field will
319 be included in the calculation.
320
321 The size of the output key must be specified in the template passed to
322 C_DeriveKey.
323 */
324 typedef struct CK_NSS_HKDFParams {
325 CK_BBOOL bExtract;
326 CK_BYTE_PTR pSalt;
327 CK_ULONG ulSaltLen;
328 CK_BBOOL bExpand;
329 CK_BYTE_PTR pInfo;
330 CK_ULONG ulInfoLen;
331 } CK_NSS_HKDFParams;
332
333 /*
334 * Trust info
335 *
336 * This isn't part of the Cryptoki standard (yet), so I'm putting
337 * all the definitions here. Some of this would move to nssckt.h
338 * if trust info were made part of the standard. In view of this
339 * possibility, I'm putting my (NSS) values in the NSS
340 * vendor space, like everything else.
341 */
342
343 typedef CK_ULONG CK_TRUST;
344
345 /* The following trust types are defined: */
346 #define CKT_VENDOR_DEFINED 0x80000000
347
348 #define CKT_NSS (CKT_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
349
350 /* If trust goes standard, these'll probably drop out of vendor space. */
351 #define CKT_NSS_TRUSTED (CKT_NSS + 1)
352 #define CKT_NSS_TRUSTED_DELEGATOR (CKT_NSS + 2)
353 #define CKT_NSS_MUST_VERIFY_TRUST (CKT_NSS + 3)
354 #define CKT_NSS_NOT_TRUSTED (CKT_NSS + 10)
355 #define CKT_NSS_TRUST_UNKNOWN (CKT_NSS + 5) /* default */
356
357 /*
358 * These may well remain NSS-specific; I'm only using them
359 * to cache resolution data.
360 */
361 #define CKT_NSS_VALID_DELEGATOR (CKT_NSS + 11)
362
363
364 /*
365 * old definitions. They still exist, but the plain meaning of the
366 * labels have never been accurate to what was really implemented.
367 * The new labels correctly reflect what the values effectively mean.
368 */
369 #if defined(__GNUC__) && (__GNUC__ > 3)
370 /* make GCC warn when we use these #defines */
371 /*
372 * This is really painful because GCC doesn't allow us to mark random
373 * #defines as deprecated. We can only mark the following:
374 * functions, variables, and types.
375 * const variables will create extra storage for everyone including this
376 * header file, so it's undesirable.
377 * functions could be inlined to prevent storage creation, but will fail
378 * when constant values are expected (like switch statements).
379 * enum types do not seem to pay attention to the deprecated attribute.
380 *
381 * That leaves typedefs. We declare new types that we then deprecate, then
382 * cast the resulting value to the deprecated type in the #define, thus
383 * producting the warning when the #define is used.
384 */
385 #if (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)
386 /* The mac doesn't like the friendlier deprecate messages. I'm assuming this
387 * is a gcc version issue rather than mac or ppc specific */
388 typedef CK_TRUST __CKT_NSS_UNTRUSTED __attribute__((deprecated));
389 typedef CK_TRUST __CKT_NSS_VALID __attribute__ ((deprecated));
390 typedef CK_TRUST __CKT_NSS_MUST_VERIFY __attribute__((deprecated));
391 #else
392 /* when possible, get a full deprecation warning. This works on gcc 4.5
393 * it may work on earlier versions of gcc */
394 typedef CK_TRUST __CKT_NSS_UNTRUSTED __attribute__((deprecated
395 ("CKT_NSS_UNTRUSTED really means CKT_NSS_MUST_VERIFY_TRUST")));
396 typedef CK_TRUST __CKT_NSS_VALID __attribute__ ((deprecated
397 ("CKT_NSS_VALID really means CKT_NSS_NOT_TRUSTED")));
398 typedef CK_TRUST __CKT_NSS_MUST_VERIFY __attribute__((deprecated
399 ("CKT_NSS_MUST_VERIFY really functions as CKT_NSS_TRUST_UNKNOWN")));
400 #endif
401 #define CKT_NSS_UNTRUSTED ((__CKT_NSS_UNTRUSTED)CKT_NSS_MUST_VERIFY_TRUST)
402 #define CKT_NSS_VALID ((__CKT_NSS_VALID) CKT_NSS_NOT_TRUSTED)
403 /* keep the old value for compatibility reasons*/
404 #define CKT_NSS_MUST_VERIFY ((__CKT_NSS_MUST_VERIFY)(CKT_NSS +4))
405 #else
406 #ifdef _WIN32
407 /* This magic gets the windows compiler to give us a deprecation
408 * warning */
409 #pragma deprecated(CKT_NSS_UNTRUSTED, CKT_NSS_MUST_VERIFY, CKT_NSS_VALID)
410 #endif
411 /* CKT_NSS_UNTRUSTED really means CKT_NSS_MUST_VERIFY_TRUST */
412 #define CKT_NSS_UNTRUSTED CKT_NSS_MUST_VERIFY_TRUST
413 /* CKT_NSS_VALID really means CKT_NSS_NOT_TRUSTED */
414 #define CKT_NSS_VALID CKT_NSS_NOT_TRUSTED
415 /* CKT_NSS_MUST_VERIFY was always treated as CKT_NSS_TRUST_UNKNOWN */
416 #define CKT_NSS_MUST_VERIFY (CKT_NSS + 4) /*really means trust unknown*/
417 #endif
418
419 /* don't leave old programs in a lurch just yet, give them the old NETSCAPE
420 * synonym */
421 #define CKO_NETSCAPE_CRL CKO_NSS_CRL
422 #define CKO_NETSCAPE_SMIME CKO_NSS_SMIME
423 #define CKO_NETSCAPE_TRUST CKO_NSS_TRUST
424 #define CKO_NETSCAPE_BUILTIN_ROOT_LIST CKO_NSS_BUILTIN_ROOT_LIST
425 #define CKO_NETSCAPE_NEWSLOT CKO_NSS_NEWSLOT
426 #define CKO_NETSCAPE_DELSLOT CKO_NSS_DELSLOT
427 #define CKK_NETSCAPE_PKCS8 CKK_NSS_PKCS8
428 #define CKA_NETSCAPE_URL CKA_NSS_URL
429 #define CKA_NETSCAPE_EMAIL CKA_NSS_EMAIL
430 #define CKA_NETSCAPE_SMIME_INFO CKA_NSS_SMIME_INFO
431 #define CKA_NETSCAPE_SMIME_TIMESTAMP CKA_NSS_SMIME_TIMESTAMP
432 #define CKA_NETSCAPE_PKCS8_SALT CKA_NSS_PKCS8_SALT
433 #define CKA_NETSCAPE_PASSWORD_CHECK CKA_NSS_PASSWORD_CHECK
434 #define CKA_NETSCAPE_EXPIRES CKA_NSS_EXPIRES
435 #define CKA_NETSCAPE_KRL CKA_NSS_KRL
436 #define CKA_NETSCAPE_PQG_COUNTER CKA_NSS_PQG_COUNTER
437 #define CKA_NETSCAPE_PQG_SEED CKA_NSS_PQG_SEED
438 #define CKA_NETSCAPE_PQG_H CKA_NSS_PQG_H
439 #define CKA_NETSCAPE_PQG_SEED_BITS CKA_NSS_PQG_SEED_BITS
440 #define CKA_NETSCAPE_MODULE_SPEC CKA_NSS_MODULE_SPEC
441 #define CKM_NETSCAPE_AES_KEY_WRAP CKM_NSS_AES_KEY_WRAP
442 #define CKM_NETSCAPE_AES_KEY_WRAP_PAD CKM_NSS_AES_KEY_WRAP_PAD
443 #define CKR_NETSCAPE_CERTDB_FAILED CKR_NSS_CERTDB_FAILED
444 #define CKR_NETSCAPE_KEYDB_FAILED CKR_NSS_KEYDB_FAILED
445
446 #define CKT_NETSCAPE_TRUSTED CKT_NSS_TRUSTED
447 #define CKT_NETSCAPE_TRUSTED_DELEGATOR CKT_NSS_TRUSTED_DELEGATOR
448 #define CKT_NETSCAPE_UNTRUSTED CKT_NSS_UNTRUSTED
449 #define CKT_NETSCAPE_MUST_VERIFY CKT_NSS_MUST_VERIFY
450 #define CKT_NETSCAPE_TRUST_UNKNOWN CKT_NSS_TRUST_UNKNOWN
451 #define CKT_NETSCAPE_VALID CKT_NSS_VALID
452 #define CKT_NETSCAPE_VALID_DELEGATOR CKT_NSS_VALID_DELEGATOR
453
454 /*
455 * These are not really PKCS #11 values specifically. They are the 'loadable'
456 * module spec NSS uses. The are available for others to use as well, but not
457 * part of the formal PKCS #11 spec.
458 *
459 * The function 'FIND' returns an array of PKCS #11 initialization strings
460 * The function 'ADD' takes a PKCS #11 initialization string and stores it.
461 * The function 'DEL' takes a 'name= library=' value and deletes the associated
462 * string.
463 * The function 'RELEASE' frees the array returned by 'FIND'
464 */
465 #define SECMOD_MODULE_DB_FUNCTION_FIND 0
466 #define SECMOD_MODULE_DB_FUNCTION_ADD 1
467 #define SECMOD_MODULE_DB_FUNCTION_DEL 2
468 #define SECMOD_MODULE_DB_FUNCTION_RELEASE 3
469 typedef char ** (PR_CALLBACK *SECMODModuleDBFunc)(unsigned long function,
470 char *parameters, void *moduleSpec);
471
472 /* softoken slot ID's */
473 #define SFTK_MIN_USER_SLOT_ID 4
474 #define SFTK_MAX_USER_SLOT_ID 100
475 #define SFTK_MIN_FIPS_USER_SLOT_ID 101
476 #define SFTK_MAX_FIPS_USER_SLOT_ID 127
477
478
479 #endif /* _PKCS11N_H_ */
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)