OLD | NEW |
---|---|
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 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 | 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/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 #ifndef _SECMODT_H_ | 4 #ifndef _SECMODT_H_ |
5 #define _SECMODT_H_ 1 | 5 #define _SECMODT_H_ 1 |
6 | 6 |
7 #include "nssrwlkt.h" | 7 #include "nssrwlkt.h" |
8 #include "nssilckt.h" | 8 #include "nssilckt.h" |
9 #include "secoid.h" | 9 #include "secoid.h" |
10 #include "secasn1.h" | 10 #include "secasn1.h" |
11 #include "pkcs11t.h" | 11 #include "pkcs11t.h" |
12 #include "utilmodt.h" | |
12 | 13 |
13 SEC_BEGIN_PROTOS | 14 SEC_BEGIN_PROTOS |
14 | 15 |
15 /* find a better home for these... */ | 16 /* find a better home for these... */ |
16 extern const SEC_ASN1Template SECKEY_PointerToEncryptedPrivateKeyInfoTemplate[]; | 17 extern const SEC_ASN1Template SECKEY_PointerToEncryptedPrivateKeyInfoTemplate[]; |
17 SEC_ASN1_CHOOSER_DECLARE(SECKEY_PointerToEncryptedPrivateKeyInfoTemplate) | 18 SEC_ASN1_CHOOSER_DECLARE(SECKEY_PointerToEncryptedPrivateKeyInfoTemplate) |
18 extern const SEC_ASN1Template SECKEY_EncryptedPrivateKeyInfoTemplate[]; | 19 extern const SEC_ASN1Template SECKEY_EncryptedPrivateKeyInfoTemplate[]; |
19 SEC_ASN1_CHOOSER_DECLARE(SECKEY_EncryptedPrivateKeyInfoTemplate) | 20 SEC_ASN1_CHOOSER_DECLARE(SECKEY_EncryptedPrivateKeyInfoTemplate) |
20 extern const SEC_ASN1Template SECKEY_PrivateKeyInfoTemplate[]; | 21 extern const SEC_ASN1Template SECKEY_PrivateKeyInfoTemplate[]; |
21 SEC_ASN1_CHOOSER_DECLARE(SECKEY_PrivateKeyInfoTemplate) | 22 SEC_ASN1_CHOOSER_DECLARE(SECKEY_PrivateKeyInfoTemplate) |
22 extern const SEC_ASN1Template SECKEY_PointerToPrivateKeyInfoTemplate[]; | 23 extern const SEC_ASN1Template SECKEY_PointerToPrivateKeyInfoTemplate[]; |
23 SEC_ASN1_CHOOSER_DECLARE(SECKEY_PointerToPrivateKeyInfoTemplate) | 24 SEC_ASN1_CHOOSER_DECLARE(SECKEY_PointerToPrivateKeyInfoTemplate) |
24 | 25 |
25 SEC_END_PROTOS | 26 SEC_END_PROTOS |
26 | 27 |
27 /* PKCS11 needs to be included */ | 28 /* PKCS11 needs to be included */ |
28 typedef struct SECMODModuleStr SECMODModule; | 29 typedef struct SECMODModuleStr SECMODModule; |
29 typedef struct SECMODModuleListStr SECMODModuleList; | 30 typedef struct SECMODModuleListStr SECMODModuleList; |
30 typedef NSSRWLock SECMODListLock; | 31 typedef NSSRWLock SECMODListLock; |
31 typedef struct PK11SlotInfoStr PK11SlotInfo; /* defined in secmodti.h */ | 32 typedef struct PK11SlotInfoStr PK11SlotInfo; /* defined in secmodti.h */ |
32 typedef struct PK11PreSlotInfoStr PK11PreSlotInfo; /* defined in secmodti.h */ | 33 typedef struct NSSUTILPreSlotInfoStr PK11PreSlotInfo; /* defined in secmodti.h * / |
wtc
2012/11/24 00:24:38
This comment needs to be updated. struct NSSUTILPr
| |
33 typedef struct PK11SymKeyStr PK11SymKey; /* defined in secmodti.h */ | 34 typedef struct PK11SymKeyStr PK11SymKey; /* defined in secmodti.h */ |
34 typedef struct PK11ContextStr PK11Context; /* defined in secmodti.h */ | 35 typedef struct PK11ContextStr PK11Context; /* defined in secmodti.h */ |
35 typedef struct PK11SlotListStr PK11SlotList; | 36 typedef struct PK11SlotListStr PK11SlotList; |
36 typedef struct PK11SlotListElementStr PK11SlotListElement; | 37 typedef struct PK11SlotListElementStr PK11SlotListElement; |
37 typedef struct PK11RSAGenParamsStr PK11RSAGenParams; | 38 typedef struct PK11RSAGenParamsStr PK11RSAGenParams; |
38 typedef unsigned long SECMODModuleID; | 39 typedef unsigned long SECMODModuleID; |
39 typedef struct PK11DefaultArrayEntryStr PK11DefaultArrayEntry; | 40 typedef struct PK11DefaultArrayEntryStr PK11DefaultArrayEntry; |
40 typedef struct PK11GenericObjectStr PK11GenericObject; | 41 typedef struct PK11GenericObjectStr PK11GenericObject; |
41 typedef void (*PK11FreeDataFunc)(void *); | 42 typedef void (*PK11FreeDataFunc)(void *); |
42 | 43 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 * in the slot, their definition, and the PKCS #11 mechanism the represent | 131 * in the slot, their definition, and the PKCS #11 mechanism the represent |
131 * Always Statically allocated. | 132 * Always Statically allocated. |
132 */ | 133 */ |
133 struct PK11DefaultArrayEntryStr { | 134 struct PK11DefaultArrayEntryStr { |
134 char *name; | 135 char *name; |
135 unsigned long flag; | 136 unsigned long flag; |
136 unsigned long mechanism; /* this is a long so we don't include the | 137 unsigned long mechanism; /* this is a long so we don't include the |
137 * whole pkcs 11 world to use this header */ | 138 * whole pkcs 11 world to use this header */ |
138 }; | 139 }; |
139 | 140 |
140 | |
141 #define SECMOD_RSA_FLAG 0x00000001L | |
142 #define SECMOD_DSA_FLAG 0x00000002L | |
143 #define SECMOD_RC2_FLAG 0x00000004L | |
144 #define SECMOD_RC4_FLAG 0x00000008L | |
145 #define SECMOD_DES_FLAG 0x00000010L | |
146 #define SECMOD_DH_FLAG 0x00000020L | |
147 #define SECMOD_FORTEZZA_FLAG 0x00000040L | |
148 #define SECMOD_RC5_FLAG 0x00000080L | |
149 #define SECMOD_SHA1_FLAG 0x00000100L | |
150 #define SECMOD_MD5_FLAG 0x00000200L | |
151 #define SECMOD_MD2_FLAG 0x00000400L | |
152 #define SECMOD_SSL_FLAG 0x00000800L | |
153 #define SECMOD_TLS_FLAG 0x00001000L | |
154 #define SECMOD_AES_FLAG 0x00002000L | |
155 #define SECMOD_SHA256_FLAG 0x00004000L | |
156 #define SECMOD_SHA512_FLAG 0x00008000L /* also for SHA384 */ | |
157 #define SECMOD_CAMELLIA_FLAG 0x00010000L /* = PUBLIC_MECH_CAMELLIA_FLAG */ | |
158 #define SECMOD_SEED_FLAG 0x00020000L | |
159 /* reserved bit for future, do not use */ | |
160 #define SECMOD_RESERVED_FLAG 0X08000000L | |
161 #define SECMOD_FRIENDLY_FLAG 0x10000000L | |
162 #define SECMOD_RANDOM_FLAG 0x80000000L | |
163 | |
164 /* need to make SECMOD and PK11 prefixes consistant. */ | |
165 #define PK11_OWN_PW_DEFAULTS 0x20000000L | |
166 #define PK11_DISABLE_FLAG 0x40000000L | |
167 | |
168 /* | 141 /* |
169 * PK11AttrFlags | 142 * PK11AttrFlags |
170 * | 143 * |
171 * A 32-bit bitmask of PK11_ATTR_XXX flags | 144 * A 32-bit bitmask of PK11_ATTR_XXX flags |
172 */ | 145 */ |
173 typedef PRUint32 PK11AttrFlags; | 146 typedef PRUint32 PK11AttrFlags; |
174 | 147 |
175 /* | 148 /* |
176 * PK11_ATTR_XXX | 149 * PK11_ATTR_XXX |
177 * | 150 * |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
466 int version; | 439 int version; |
467 unsigned long reserved1; | 440 unsigned long reserved1; |
468 unsigned long reserved2; | 441 unsigned long reserved2; |
469 unsigned long reserved3; | 442 unsigned long reserved3; |
470 void *reserverd4; | 443 void *reserverd4; |
471 void *reserverd5; | 444 void *reserverd5; |
472 }; | 445 }; |
473 | 446 |
474 | 447 |
475 #endif /*_SECMODT_H_ */ | 448 #endif /*_SECMODT_H_ */ |
OLD | NEW |