pkcs11 0.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data.tar.gz.sig +0 -0
  2. data/.autotest +23 -0
  3. data/.gemtest +0 -0
  4. data/.yardopts +1 -0
  5. data/History.txt +57 -0
  6. data/MIT-LICENSE +22 -0
  7. data/Manifest.txt +57 -0
  8. data/README.rdoc +205 -0
  9. data/Rakefile +111 -0
  10. data/ext/extconf.rb +7 -0
  11. data/ext/generate_constants.rb +57 -0
  12. data/ext/generate_structs.rb +206 -0
  13. data/ext/generate_thread_funcs.rb +72 -0
  14. data/ext/include/cryptoki.h +66 -0
  15. data/ext/include/ct-kip.h +50 -0
  16. data/ext/include/otp-pkcs11.h +125 -0
  17. data/ext/include/pkcs-11v2-20a3.h +124 -0
  18. data/ext/include/pkcs11.h +299 -0
  19. data/ext/include/pkcs11f.h +912 -0
  20. data/ext/include/pkcs11t.h +1885 -0
  21. data/ext/pk11.c +1675 -0
  22. data/ext/pk11.h +81 -0
  23. data/ext/pk11_const.c +205 -0
  24. data/ext/pk11_const_def.inc +452 -0
  25. data/ext/pk11_const_macros.h +38 -0
  26. data/ext/pk11_struct.doc +792 -0
  27. data/ext/pk11_struct_def.inc +302 -0
  28. data/ext/pk11_struct_impl.inc +302 -0
  29. data/ext/pk11_struct_macros.h +435 -0
  30. data/ext/pk11_thread_funcs.c +411 -0
  31. data/ext/pk11_thread_funcs.h +482 -0
  32. data/ext/pk11_version.h +6 -0
  33. data/lib/2.0/pkcs11_ext.so +0 -0
  34. data/lib/pkcs11.rb +9 -0
  35. data/lib/pkcs11/extensions.rb +68 -0
  36. data/lib/pkcs11/helper.rb +144 -0
  37. data/lib/pkcs11/library.rb +140 -0
  38. data/lib/pkcs11/object.rb +171 -0
  39. data/lib/pkcs11/session.rb +765 -0
  40. data/lib/pkcs11/slot.rb +102 -0
  41. data/pkcs11_protect_server/Manifest.txt +14 -0
  42. data/pkcs11_protect_server/README_PROTECT_SERVER.rdoc +89 -0
  43. data/test/fixtures/softokn/cert8.db +0 -0
  44. data/test/fixtures/softokn/key3.db +0 -0
  45. data/test/fixtures/softokn/secmod.db +0 -0
  46. data/test/helper.rb +58 -0
  47. data/test/test_pkcs11.rb +71 -0
  48. data/test/test_pkcs11_crypt.rb +220 -0
  49. data/test/test_pkcs11_object.rb +122 -0
  50. data/test/test_pkcs11_session.rb +123 -0
  51. data/test/test_pkcs11_slot.rb +78 -0
  52. data/test/test_pkcs11_structs.rb +166 -0
  53. data/test/test_pkcs11_thread.rb +44 -0
  54. metadata +213 -0
  55. metadata.gz.sig +0 -0
@@ -0,0 +1,302 @@
1
+ PKCS11_DEFINE_STRUCT(CK_VERSION);
2
+ PKCS11_DEFINE_MEMBER(CK_VERSION, major);
3
+ PKCS11_DEFINE_MEMBER(CK_VERSION, minor);
4
+
5
+ PKCS11_DEFINE_STRUCT(CK_INFO);
6
+ PKCS11_DEFINE_MEMBER(CK_INFO, cryptokiVersion);
7
+ PKCS11_DEFINE_MEMBER(CK_INFO, manufacturerID);
8
+ PKCS11_DEFINE_MEMBER(CK_INFO, flags);
9
+ PKCS11_DEFINE_MEMBER(CK_INFO, libraryDescription);
10
+ PKCS11_DEFINE_MEMBER(CK_INFO, libraryVersion);
11
+
12
+ PKCS11_DEFINE_STRUCT(CK_SLOT_INFO);
13
+ PKCS11_DEFINE_MEMBER(CK_SLOT_INFO, slotDescription);
14
+ PKCS11_DEFINE_MEMBER(CK_SLOT_INFO, manufacturerID);
15
+ PKCS11_DEFINE_MEMBER(CK_SLOT_INFO, flags);
16
+ PKCS11_DEFINE_MEMBER(CK_SLOT_INFO, hardwareVersion);
17
+ PKCS11_DEFINE_MEMBER(CK_SLOT_INFO, firmwareVersion);
18
+
19
+ PKCS11_DEFINE_STRUCT(CK_TOKEN_INFO);
20
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, label);
21
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, manufacturerID);
22
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, model);
23
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, serialNumber);
24
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, flags);
25
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulMaxSessionCount);
26
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulSessionCount);
27
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulMaxRwSessionCount);
28
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulRwSessionCount);
29
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulMaxPinLen);
30
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulMinPinLen);
31
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulTotalPublicMemory);
32
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulFreePublicMemory);
33
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulTotalPrivateMemory);
34
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, ulFreePrivateMemory);
35
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, hardwareVersion);
36
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, firmwareVersion);
37
+ PKCS11_DEFINE_MEMBER(CK_TOKEN_INFO, utcTime);
38
+
39
+ PKCS11_DEFINE_STRUCT(CK_SESSION_INFO);
40
+ PKCS11_DEFINE_MEMBER(CK_SESSION_INFO, slotID);
41
+ PKCS11_DEFINE_MEMBER(CK_SESSION_INFO, state);
42
+ PKCS11_DEFINE_MEMBER(CK_SESSION_INFO, flags);
43
+ PKCS11_DEFINE_MEMBER(CK_SESSION_INFO, ulDeviceError);
44
+
45
+ PKCS11_DEFINE_STRUCT(CK_DATE);
46
+ PKCS11_DEFINE_MEMBER(CK_DATE, year);
47
+ PKCS11_DEFINE_MEMBER(CK_DATE, month);
48
+ PKCS11_DEFINE_MEMBER(CK_DATE, day);
49
+
50
+ PKCS11_DEFINE_STRUCT(CK_MECHANISM_INFO);
51
+ PKCS11_DEFINE_MEMBER(CK_MECHANISM_INFO, ulMinKeySize);
52
+ PKCS11_DEFINE_MEMBER(CK_MECHANISM_INFO, ulMaxKeySize);
53
+ PKCS11_DEFINE_MEMBER(CK_MECHANISM_INFO, flags);
54
+
55
+ PKCS11_DEFINE_STRUCT(CK_C_INITIALIZE_ARGS);
56
+ PKCS11_DEFINE_MEMBER(CK_C_INITIALIZE_ARGS, pReserved);
57
+ /* unimplemented attr CK_CREATEMUTEX CreateMutex */
58
+ /* unimplemented attr CK_DESTROYMUTEX DestroyMutex */
59
+ /* unimplemented attr CK_LOCKMUTEX LockMutex */
60
+ /* unimplemented attr CK_UNLOCKMUTEX UnlockMutex */
61
+ PKCS11_DEFINE_MEMBER(CK_C_INITIALIZE_ARGS, flags);
62
+
63
+ PKCS11_DEFINE_STRUCT(CK_RSA_PKCS_OAEP_PARAMS);
64
+ PKCS11_DEFINE_MEMBER(CK_RSA_PKCS_OAEP_PARAMS, pSourceData);
65
+ PKCS11_DEFINE_MEMBER(CK_RSA_PKCS_OAEP_PARAMS, hashAlg);
66
+ PKCS11_DEFINE_MEMBER(CK_RSA_PKCS_OAEP_PARAMS, mgf);
67
+ PKCS11_DEFINE_MEMBER(CK_RSA_PKCS_OAEP_PARAMS, source);
68
+
69
+ PKCS11_DEFINE_STRUCT(CK_RSA_PKCS_PSS_PARAMS);
70
+ PKCS11_DEFINE_MEMBER(CK_RSA_PKCS_PSS_PARAMS, hashAlg);
71
+ PKCS11_DEFINE_MEMBER(CK_RSA_PKCS_PSS_PARAMS, mgf);
72
+ PKCS11_DEFINE_MEMBER(CK_RSA_PKCS_PSS_PARAMS, sLen);
73
+
74
+ PKCS11_DEFINE_STRUCT(CK_ECDH1_DERIVE_PARAMS);
75
+ PKCS11_DEFINE_MEMBER(CK_ECDH1_DERIVE_PARAMS, pSharedData);
76
+ PKCS11_DEFINE_MEMBER(CK_ECDH1_DERIVE_PARAMS, pPublicData);
77
+ PKCS11_DEFINE_MEMBER(CK_ECDH1_DERIVE_PARAMS, kdf);
78
+
79
+ PKCS11_DEFINE_STRUCT(CK_ECDH2_DERIVE_PARAMS);
80
+ PKCS11_DEFINE_MEMBER(CK_ECDH2_DERIVE_PARAMS, pSharedData);
81
+ PKCS11_DEFINE_MEMBER(CK_ECDH2_DERIVE_PARAMS, pPublicData);
82
+ PKCS11_DEFINE_MEMBER(CK_ECDH2_DERIVE_PARAMS, pPublicData2);
83
+ PKCS11_DEFINE_MEMBER(CK_ECDH2_DERIVE_PARAMS, kdf);
84
+ PKCS11_DEFINE_MEMBER(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen);
85
+ PKCS11_DEFINE_MEMBER(CK_ECDH2_DERIVE_PARAMS, hPrivateData);
86
+ PKCS11_DEFINE_MEMBER(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2);
87
+
88
+ PKCS11_DEFINE_STRUCT(CK_ECMQV_DERIVE_PARAMS);
89
+ PKCS11_DEFINE_MEMBER(CK_ECMQV_DERIVE_PARAMS, pSharedData);
90
+ PKCS11_DEFINE_MEMBER(CK_ECMQV_DERIVE_PARAMS, pPublicData);
91
+ PKCS11_DEFINE_MEMBER(CK_ECMQV_DERIVE_PARAMS, pPublicData2);
92
+ PKCS11_DEFINE_MEMBER(CK_ECMQV_DERIVE_PARAMS, kdf);
93
+ PKCS11_DEFINE_MEMBER(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen);
94
+ PKCS11_DEFINE_MEMBER(CK_ECMQV_DERIVE_PARAMS, hPrivateData);
95
+ PKCS11_DEFINE_MEMBER(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2);
96
+ PKCS11_DEFINE_MEMBER(CK_ECMQV_DERIVE_PARAMS, publicKey);
97
+
98
+ PKCS11_DEFINE_STRUCT(CK_X9_42_DH1_DERIVE_PARAMS);
99
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo);
100
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData);
101
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH1_DERIVE_PARAMS, kdf);
102
+
103
+ PKCS11_DEFINE_STRUCT(CK_X9_42_DH2_DERIVE_PARAMS);
104
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo);
105
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData);
106
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2);
107
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH2_DERIVE_PARAMS, kdf);
108
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen);
109
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData);
110
+ PKCS11_DEFINE_MEMBER(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2);
111
+
112
+ PKCS11_DEFINE_STRUCT(CK_X9_42_MQV_DERIVE_PARAMS);
113
+ PKCS11_DEFINE_MEMBER(CK_X9_42_MQV_DERIVE_PARAMS, pOtherInfo);
114
+ PKCS11_DEFINE_MEMBER(CK_X9_42_MQV_DERIVE_PARAMS, pPublicData);
115
+ PKCS11_DEFINE_MEMBER(CK_X9_42_MQV_DERIVE_PARAMS, pPublicData2);
116
+ PKCS11_DEFINE_MEMBER(CK_X9_42_MQV_DERIVE_PARAMS, kdf);
117
+ PKCS11_DEFINE_MEMBER(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen);
118
+ PKCS11_DEFINE_MEMBER(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData);
119
+ PKCS11_DEFINE_MEMBER(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2);
120
+ PKCS11_DEFINE_MEMBER(CK_X9_42_MQV_DERIVE_PARAMS, publicKey);
121
+
122
+ PKCS11_DEFINE_STRUCT(CK_KEA_DERIVE_PARAMS);
123
+ PKCS11_DEFINE_MEMBER(CK_KEA_DERIVE_PARAMS, pRandomA);
124
+ PKCS11_DEFINE_MEMBER(CK_KEA_DERIVE_PARAMS, pRandomB);
125
+ PKCS11_DEFINE_MEMBER(CK_KEA_DERIVE_PARAMS, pPublicData);
126
+ PKCS11_DEFINE_MEMBER(CK_KEA_DERIVE_PARAMS, isSender);
127
+ PKCS11_DEFINE_MEMBER(CK_KEA_DERIVE_PARAMS, ulRandomLen);
128
+
129
+ PKCS11_DEFINE_STRUCT(CK_RC2_CBC_PARAMS);
130
+ PKCS11_DEFINE_MEMBER(CK_RC2_CBC_PARAMS, ulEffectiveBits);
131
+ PKCS11_DEFINE_MEMBER(CK_RC2_CBC_PARAMS, iv);
132
+
133
+ PKCS11_DEFINE_STRUCT(CK_RC2_MAC_GENERAL_PARAMS);
134
+ PKCS11_DEFINE_MEMBER(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits);
135
+ PKCS11_DEFINE_MEMBER(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength);
136
+
137
+ PKCS11_DEFINE_STRUCT(CK_RC5_PARAMS);
138
+ PKCS11_DEFINE_MEMBER(CK_RC5_PARAMS, ulWordsize);
139
+ PKCS11_DEFINE_MEMBER(CK_RC5_PARAMS, ulRounds);
140
+
141
+ PKCS11_DEFINE_STRUCT(CK_RC5_CBC_PARAMS);
142
+ PKCS11_DEFINE_MEMBER(CK_RC5_CBC_PARAMS, pIv);
143
+ PKCS11_DEFINE_MEMBER(CK_RC5_CBC_PARAMS, ulWordsize);
144
+ PKCS11_DEFINE_MEMBER(CK_RC5_CBC_PARAMS, ulRounds);
145
+
146
+ PKCS11_DEFINE_STRUCT(CK_RC5_MAC_GENERAL_PARAMS);
147
+ PKCS11_DEFINE_MEMBER(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize);
148
+ PKCS11_DEFINE_MEMBER(CK_RC5_MAC_GENERAL_PARAMS, ulRounds);
149
+ PKCS11_DEFINE_MEMBER(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength);
150
+
151
+ PKCS11_DEFINE_STRUCT(CK_DES_CBC_ENCRYPT_DATA_PARAMS);
152
+ PKCS11_DEFINE_MEMBER(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData);
153
+ PKCS11_DEFINE_MEMBER(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv);
154
+
155
+ PKCS11_DEFINE_STRUCT(CK_AES_CBC_ENCRYPT_DATA_PARAMS);
156
+ PKCS11_DEFINE_MEMBER(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData);
157
+ PKCS11_DEFINE_MEMBER(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv);
158
+
159
+ PKCS11_DEFINE_STRUCT(CK_SKIPJACK_PRIVATE_WRAP_PARAMS);
160
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword);
161
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData);
162
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA);
163
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP);
164
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG);
165
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ);
166
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen);
167
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen);
168
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen);
169
+
170
+ PKCS11_DEFINE_STRUCT(CK_SKIPJACK_RELAYX_PARAMS);
171
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX);
172
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword);
173
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData);
174
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA);
175
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword);
176
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData);
177
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA);
178
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen);
179
+ PKCS11_DEFINE_MEMBER(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen);
180
+
181
+ PKCS11_DEFINE_STRUCT(CK_PBE_PARAMS);
182
+ PKCS11_DEFINE_MEMBER(CK_PBE_PARAMS, pInitVector);
183
+ PKCS11_DEFINE_MEMBER(CK_PBE_PARAMS, pPassword);
184
+ PKCS11_DEFINE_MEMBER(CK_PBE_PARAMS, pSalt);
185
+ PKCS11_DEFINE_MEMBER(CK_PBE_PARAMS, ulIteration);
186
+
187
+ PKCS11_DEFINE_STRUCT(CK_KEY_WRAP_SET_OAEP_PARAMS);
188
+ PKCS11_DEFINE_MEMBER(CK_KEY_WRAP_SET_OAEP_PARAMS, pX);
189
+ PKCS11_DEFINE_MEMBER(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC);
190
+
191
+ PKCS11_DEFINE_STRUCT(CK_SSL3_RANDOM_DATA);
192
+ PKCS11_DEFINE_MEMBER(CK_SSL3_RANDOM_DATA, pClientRandom);
193
+ PKCS11_DEFINE_MEMBER(CK_SSL3_RANDOM_DATA, pServerRandom);
194
+
195
+ PKCS11_DEFINE_STRUCT(CK_SSL3_MASTER_KEY_DERIVE_PARAMS);
196
+ PKCS11_DEFINE_MEMBER(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, RandomInfo);
197
+ PKCS11_DEFINE_MEMBER(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, pVersion);
198
+
199
+ PKCS11_DEFINE_STRUCT(CK_SSL3_KEY_MAT_OUT);
200
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_OUT, pIVClient);
201
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_OUT, pIVServer);
202
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_OUT, hClientMacSecret);
203
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_OUT, hServerMacSecret);
204
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_OUT, hClientKey);
205
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_OUT, hServerKey);
206
+
207
+ PKCS11_DEFINE_STRUCT(CK_SSL3_KEY_MAT_PARAMS);
208
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits);
209
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits);
210
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits);
211
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_PARAMS, bIsExport);
212
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_PARAMS, RandomInfo);
213
+ PKCS11_DEFINE_MEMBER(CK_SSL3_KEY_MAT_PARAMS, pReturnedKeyMaterial);
214
+
215
+ PKCS11_DEFINE_STRUCT(CK_TLS_PRF_PARAMS);
216
+ PKCS11_DEFINE_MEMBER(CK_TLS_PRF_PARAMS, pSeed);
217
+ PKCS11_DEFINE_MEMBER(CK_TLS_PRF_PARAMS, pLabel);
218
+ PKCS11_DEFINE_MEMBER(CK_TLS_PRF_PARAMS, pOutput);
219
+ PKCS11_DEFINE_MEMBER(CK_TLS_PRF_PARAMS, pulOutputLen);
220
+
221
+ PKCS11_DEFINE_STRUCT(CK_WTLS_RANDOM_DATA);
222
+ PKCS11_DEFINE_MEMBER(CK_WTLS_RANDOM_DATA, pClientRandom);
223
+ PKCS11_DEFINE_MEMBER(CK_WTLS_RANDOM_DATA, pServerRandom);
224
+
225
+ PKCS11_DEFINE_STRUCT(CK_WTLS_MASTER_KEY_DERIVE_PARAMS);
226
+ PKCS11_DEFINE_MEMBER(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion);
227
+ PKCS11_DEFINE_MEMBER(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism);
228
+ PKCS11_DEFINE_MEMBER(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, RandomInfo);
229
+
230
+ PKCS11_DEFINE_STRUCT(CK_WTLS_PRF_PARAMS);
231
+ PKCS11_DEFINE_MEMBER(CK_WTLS_PRF_PARAMS, pSeed);
232
+ PKCS11_DEFINE_MEMBER(CK_WTLS_PRF_PARAMS, pLabel);
233
+ PKCS11_DEFINE_MEMBER(CK_WTLS_PRF_PARAMS, pOutput);
234
+ PKCS11_DEFINE_MEMBER(CK_WTLS_PRF_PARAMS, DigestMechanism);
235
+ PKCS11_DEFINE_MEMBER(CK_WTLS_PRF_PARAMS, pulOutputLen);
236
+
237
+ PKCS11_DEFINE_STRUCT(CK_WTLS_KEY_MAT_OUT);
238
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_OUT, pIV);
239
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_OUT, hMacSecret);
240
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_OUT, hKey);
241
+
242
+ PKCS11_DEFINE_STRUCT(CK_WTLS_KEY_MAT_PARAMS);
243
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism);
244
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits);
245
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits);
246
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits);
247
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber);
248
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_PARAMS, bIsExport);
249
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_PARAMS, RandomInfo);
250
+ PKCS11_DEFINE_MEMBER(CK_WTLS_KEY_MAT_PARAMS, pReturnedKeyMaterial);
251
+
252
+ PKCS11_DEFINE_STRUCT(CK_CMS_SIG_PARAMS);
253
+ PKCS11_DEFINE_MEMBER(CK_CMS_SIG_PARAMS, pContentType);
254
+ PKCS11_DEFINE_MEMBER(CK_CMS_SIG_PARAMS, pRequestedAttributes);
255
+ PKCS11_DEFINE_MEMBER(CK_CMS_SIG_PARAMS, pRequiredAttributes);
256
+ PKCS11_DEFINE_MEMBER(CK_CMS_SIG_PARAMS, certificateHandle);
257
+ PKCS11_DEFINE_MEMBER(CK_CMS_SIG_PARAMS, pSigningMechanism);
258
+ PKCS11_DEFINE_MEMBER(CK_CMS_SIG_PARAMS, pDigestMechanism);
259
+
260
+ PKCS11_DEFINE_STRUCT(CK_KEY_DERIVATION_STRING_DATA);
261
+ PKCS11_DEFINE_MEMBER(CK_KEY_DERIVATION_STRING_DATA, pData);
262
+
263
+ PKCS11_DEFINE_STRUCT(CK_PKCS5_PBKD2_PARAMS);
264
+ PKCS11_DEFINE_MEMBER(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData);
265
+ PKCS11_DEFINE_MEMBER(CK_PKCS5_PBKD2_PARAMS, pPrfData);
266
+ PKCS11_DEFINE_MEMBER(CK_PKCS5_PBKD2_PARAMS, pPassword);
267
+ PKCS11_DEFINE_MEMBER(CK_PKCS5_PBKD2_PARAMS, saltSource);
268
+ PKCS11_DEFINE_MEMBER(CK_PKCS5_PBKD2_PARAMS, iterations);
269
+ PKCS11_DEFINE_MEMBER(CK_PKCS5_PBKD2_PARAMS, prf);
270
+ PKCS11_DEFINE_MEMBER(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen);
271
+
272
+ PKCS11_DEFINE_STRUCT(CK_OTP_PARAM);
273
+ PKCS11_DEFINE_MEMBER(CK_OTP_PARAM, pValue);
274
+ PKCS11_DEFINE_MEMBER(CK_OTP_PARAM, type);
275
+
276
+ PKCS11_DEFINE_STRUCT(CK_OTP_PARAMS);
277
+ PKCS11_DEFINE_MEMBER(CK_OTP_PARAMS, pParams);
278
+
279
+ PKCS11_DEFINE_STRUCT(CK_OTP_SIGNATURE_INFO);
280
+ PKCS11_DEFINE_MEMBER(CK_OTP_SIGNATURE_INFO, pParams);
281
+
282
+ PKCS11_DEFINE_STRUCT(CK_KIP_PARAMS);
283
+ PKCS11_DEFINE_MEMBER(CK_KIP_PARAMS, pSeed);
284
+ PKCS11_DEFINE_MEMBER(CK_KIP_PARAMS, pMechanism);
285
+ PKCS11_DEFINE_MEMBER(CK_KIP_PARAMS, hKey);
286
+
287
+ PKCS11_DEFINE_STRUCT(CK_AES_CTR_PARAMS);
288
+ PKCS11_DEFINE_MEMBER(CK_AES_CTR_PARAMS, ulCounterBits);
289
+ PKCS11_DEFINE_MEMBER(CK_AES_CTR_PARAMS, cb);
290
+
291
+ PKCS11_DEFINE_STRUCT(CK_CAMELLIA_CTR_PARAMS);
292
+ PKCS11_DEFINE_MEMBER(CK_CAMELLIA_CTR_PARAMS, ulCounterBits);
293
+ PKCS11_DEFINE_MEMBER(CK_CAMELLIA_CTR_PARAMS, cb);
294
+
295
+ PKCS11_DEFINE_STRUCT(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS);
296
+ PKCS11_DEFINE_MEMBER(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData);
297
+ PKCS11_DEFINE_MEMBER(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv);
298
+
299
+ PKCS11_DEFINE_STRUCT(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS);
300
+ PKCS11_DEFINE_MEMBER(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData);
301
+ PKCS11_DEFINE_MEMBER(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv);
302
+
@@ -0,0 +1,302 @@
1
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_VERSION);
2
+ PKCS11_IMPLEMENT_BYTE_ACCESSOR(CK_VERSION, major);
3
+ PKCS11_IMPLEMENT_BYTE_ACCESSOR(CK_VERSION, minor);
4
+
5
+ PKCS11_IMPLEMENT_ALLOCATOR(CK_INFO);
6
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_INFO, CK_VERSION, cryptokiVersion);
7
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_INFO, manufacturerID);
8
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_INFO, flags);
9
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_INFO, libraryDescription);
10
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_INFO, CK_VERSION, libraryVersion);
11
+
12
+ PKCS11_IMPLEMENT_ALLOCATOR(CK_SLOT_INFO);
13
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_SLOT_INFO, slotDescription);
14
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_SLOT_INFO, manufacturerID);
15
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SLOT_INFO, flags);
16
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_SLOT_INFO, CK_VERSION, hardwareVersion);
17
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_SLOT_INFO, CK_VERSION, firmwareVersion);
18
+
19
+ PKCS11_IMPLEMENT_ALLOCATOR(CK_TOKEN_INFO);
20
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_TOKEN_INFO, label);
21
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_TOKEN_INFO, manufacturerID);
22
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_TOKEN_INFO, model);
23
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_TOKEN_INFO, serialNumber);
24
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, flags);
25
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulMaxSessionCount);
26
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulSessionCount);
27
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulMaxRwSessionCount);
28
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulRwSessionCount);
29
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulMaxPinLen);
30
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulMinPinLen);
31
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulTotalPublicMemory);
32
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulFreePublicMemory);
33
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulTotalPrivateMemory);
34
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_TOKEN_INFO, ulFreePrivateMemory);
35
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_TOKEN_INFO, CK_VERSION, hardwareVersion);
36
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_TOKEN_INFO, CK_VERSION, firmwareVersion);
37
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_TOKEN_INFO, utcTime);
38
+
39
+ PKCS11_IMPLEMENT_ALLOCATOR(CK_SESSION_INFO);
40
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SESSION_INFO, slotID);
41
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SESSION_INFO, state);
42
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SESSION_INFO, flags);
43
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SESSION_INFO, ulDeviceError);
44
+
45
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_DATE);
46
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DATE, year);
47
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DATE, month);
48
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DATE, day);
49
+
50
+ PKCS11_IMPLEMENT_ALLOCATOR(CK_MECHANISM_INFO);
51
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_MECHANISM_INFO, ulMinKeySize);
52
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_MECHANISM_INFO, ulMaxKeySize);
53
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_MECHANISM_INFO, flags);
54
+
55
+ PKCS11_IMPLEMENT_ALLOCATOR(CK_C_INITIALIZE_ARGS);
56
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_C_INITIALIZE_ARGS, pReserved);
57
+ /* unimplemented attr CK_CREATEMUTEX CreateMutex */
58
+ /* unimplemented attr CK_DESTROYMUTEX DestroyMutex */
59
+ /* unimplemented attr CK_LOCKMUTEX LockMutex */
60
+ /* unimplemented attr CK_UNLOCKMUTEX UnlockMutex */
61
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_C_INITIALIZE_ARGS, flags);
62
+
63
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_RSA_PKCS_OAEP_PARAMS);
64
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_RSA_PKCS_OAEP_PARAMS, pSourceData, ulSourceDataLen);
65
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RSA_PKCS_OAEP_PARAMS, hashAlg);
66
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RSA_PKCS_OAEP_PARAMS, mgf);
67
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RSA_PKCS_OAEP_PARAMS, source);
68
+
69
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_RSA_PKCS_PSS_PARAMS);
70
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RSA_PKCS_PSS_PARAMS, hashAlg);
71
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RSA_PKCS_PSS_PARAMS, mgf);
72
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RSA_PKCS_PSS_PARAMS, sLen);
73
+
74
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_ECDH1_DERIVE_PARAMS);
75
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_ECDH1_DERIVE_PARAMS, pSharedData, ulSharedDataLen);
76
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_ECDH1_DERIVE_PARAMS, pPublicData, ulPublicDataLen);
77
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECDH1_DERIVE_PARAMS, kdf);
78
+
79
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_ECDH2_DERIVE_PARAMS);
80
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_ECDH2_DERIVE_PARAMS, pSharedData, ulSharedDataLen);
81
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_ECDH2_DERIVE_PARAMS, pPublicData, ulPublicDataLen);
82
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_ECDH2_DERIVE_PARAMS, pPublicData2);
83
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECDH2_DERIVE_PARAMS, kdf);
84
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECDH2_DERIVE_PARAMS, ulPrivateDataLen);
85
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_ECDH2_DERIVE_PARAMS, hPrivateData);
86
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECDH2_DERIVE_PARAMS, ulPublicDataLen2);
87
+
88
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_ECMQV_DERIVE_PARAMS);
89
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_ECMQV_DERIVE_PARAMS, pSharedData, ulSharedDataLen);
90
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_ECMQV_DERIVE_PARAMS, pPublicData, ulPublicDataLen);
91
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_ECMQV_DERIVE_PARAMS, pPublicData2);
92
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECMQV_DERIVE_PARAMS, kdf);
93
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECMQV_DERIVE_PARAMS, ulPrivateDataLen);
94
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_ECMQV_DERIVE_PARAMS, hPrivateData);
95
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_ECMQV_DERIVE_PARAMS, ulPublicDataLen2);
96
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_ECMQV_DERIVE_PARAMS, publicKey);
97
+
98
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_X9_42_DH1_DERIVE_PARAMS);
99
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_X9_42_DH1_DERIVE_PARAMS, pOtherInfo, ulOtherInfoLen);
100
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_X9_42_DH1_DERIVE_PARAMS, pPublicData, ulPublicDataLen);
101
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_X9_42_DH1_DERIVE_PARAMS, kdf);
102
+
103
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_X9_42_DH2_DERIVE_PARAMS);
104
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_X9_42_DH2_DERIVE_PARAMS, pOtherInfo, ulOtherInfoLen);
105
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData, ulPublicDataLen);
106
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_X9_42_DH2_DERIVE_PARAMS, pPublicData2);
107
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_X9_42_DH2_DERIVE_PARAMS, kdf);
108
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_X9_42_DH2_DERIVE_PARAMS, ulPrivateDataLen);
109
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_X9_42_DH2_DERIVE_PARAMS, hPrivateData);
110
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_X9_42_DH2_DERIVE_PARAMS, ulPublicDataLen2);
111
+
112
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_X9_42_MQV_DERIVE_PARAMS);
113
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_X9_42_MQV_DERIVE_PARAMS, pOtherInfo, ulOtherInfoLen);
114
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_X9_42_MQV_DERIVE_PARAMS, pPublicData, ulPublicDataLen);
115
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_X9_42_MQV_DERIVE_PARAMS, pPublicData2);
116
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_X9_42_MQV_DERIVE_PARAMS, kdf);
117
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_X9_42_MQV_DERIVE_PARAMS, ulPrivateDataLen);
118
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_X9_42_MQV_DERIVE_PARAMS, hPrivateData);
119
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_X9_42_MQV_DERIVE_PARAMS, ulPublicDataLen2);
120
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_X9_42_MQV_DERIVE_PARAMS, publicKey);
121
+
122
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_KEA_DERIVE_PARAMS);
123
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_KEA_DERIVE_PARAMS, pRandomA);
124
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_KEA_DERIVE_PARAMS, pRandomB);
125
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_KEA_DERIVE_PARAMS, pPublicData, ulPublicDataLen);
126
+ PKCS11_IMPLEMENT_BOOL_ACCESSOR(CK_KEA_DERIVE_PARAMS, isSender);
127
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_KEA_DERIVE_PARAMS, ulRandomLen);
128
+
129
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_RC2_CBC_PARAMS);
130
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC2_CBC_PARAMS, ulEffectiveBits);
131
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_RC2_CBC_PARAMS, iv);
132
+
133
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_RC2_MAC_GENERAL_PARAMS);
134
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC2_MAC_GENERAL_PARAMS, ulEffectiveBits);
135
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC2_MAC_GENERAL_PARAMS, ulMacLength);
136
+
137
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_RC5_PARAMS);
138
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC5_PARAMS, ulWordsize);
139
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC5_PARAMS, ulRounds);
140
+
141
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_RC5_CBC_PARAMS);
142
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_RC5_CBC_PARAMS, pIv, ulIvLen);
143
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC5_CBC_PARAMS, ulWordsize);
144
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC5_CBC_PARAMS, ulRounds);
145
+
146
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_RC5_MAC_GENERAL_PARAMS);
147
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC5_MAC_GENERAL_PARAMS, ulWordsize);
148
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC5_MAC_GENERAL_PARAMS, ulRounds);
149
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_RC5_MAC_GENERAL_PARAMS, ulMacLength);
150
+
151
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_DES_CBC_ENCRYPT_DATA_PARAMS);
152
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_DES_CBC_ENCRYPT_DATA_PARAMS, pData, length);
153
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_DES_CBC_ENCRYPT_DATA_PARAMS, iv);
154
+
155
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_AES_CBC_ENCRYPT_DATA_PARAMS);
156
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_AES_CBC_ENCRYPT_DATA_PARAMS, pData, length);
157
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_AES_CBC_ENCRYPT_DATA_PARAMS, iv);
158
+
159
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS);
160
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPassword, ulPasswordLen);
161
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPublicData, ulPublicDataLen);
162
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pRandomA);
163
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pPrimeP);
164
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pBaseG);
165
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, pSubprimeQ);
166
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulPAndGLen);
167
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulQLen);
168
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SKIPJACK_PRIVATE_WRAP_PARAMS, ulRandomLen);
169
+
170
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_SKIPJACK_RELAYX_PARAMS);
171
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, pOldWrappedX, ulOldWrappedXLen);
172
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, pOldPassword, ulOldPasswordLen);
173
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, pOldPublicData, ulOldPublicDataLen);
174
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, pOldRandomA);
175
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, pNewPassword, ulNewPasswordLen);
176
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, pNewPublicData, ulNewPublicDataLen);
177
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, pNewRandomA);
178
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, ulOldRandomLen);
179
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SKIPJACK_RELAYX_PARAMS, ulNewRandomLen);
180
+
181
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_PBE_PARAMS);
182
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_PBE_PARAMS, pInitVector);
183
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_PBE_PARAMS, pPassword, ulPasswordLen);
184
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_PBE_PARAMS, pSalt, ulSaltLen);
185
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PBE_PARAMS, ulIteration);
186
+
187
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_KEY_WRAP_SET_OAEP_PARAMS);
188
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_KEY_WRAP_SET_OAEP_PARAMS, pX, ulXLen);
189
+ PKCS11_IMPLEMENT_BYTE_ACCESSOR(CK_KEY_WRAP_SET_OAEP_PARAMS, bBC);
190
+
191
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_SSL3_RANDOM_DATA);
192
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SSL3_RANDOM_DATA, pClientRandom, ulClientRandomLen);
193
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_SSL3_RANDOM_DATA, pServerRandom, ulServerRandomLen);
194
+
195
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_SSL3_MASTER_KEY_DERIVE_PARAMS);
196
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, CK_SSL3_RANDOM_DATA, RandomInfo);
197
+ PKCS11_IMPLEMENT_STRUCT_PTR_ACCESSOR(CK_SSL3_MASTER_KEY_DERIVE_PARAMS, CK_VERSION, pVersion);
198
+
199
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_SSL3_KEY_MAT_OUT);
200
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_SSL3_KEY_MAT_OUT, pIVClient);
201
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_SSL3_KEY_MAT_OUT, pIVServer);
202
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_SSL3_KEY_MAT_OUT, hClientMacSecret);
203
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_SSL3_KEY_MAT_OUT, hServerMacSecret);
204
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_SSL3_KEY_MAT_OUT, hClientKey);
205
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_SSL3_KEY_MAT_OUT, hServerKey);
206
+
207
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_SSL3_KEY_MAT_PARAMS);
208
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SSL3_KEY_MAT_PARAMS, ulMacSizeInBits);
209
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SSL3_KEY_MAT_PARAMS, ulKeySizeInBits);
210
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SSL3_KEY_MAT_PARAMS, ulIVSizeInBits);
211
+ PKCS11_IMPLEMENT_BOOL_ACCESSOR(CK_SSL3_KEY_MAT_PARAMS, bIsExport);
212
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_SSL3_KEY_MAT_PARAMS, CK_SSL3_RANDOM_DATA, RandomInfo);
213
+ PKCS11_IMPLEMENT_STRUCT_PTR_ACCESSOR(CK_SSL3_KEY_MAT_PARAMS, CK_SSL3_KEY_MAT_OUT, pReturnedKeyMaterial);
214
+
215
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_TLS_PRF_PARAMS);
216
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_TLS_PRF_PARAMS, pSeed, ulSeedLen);
217
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_TLS_PRF_PARAMS, pLabel, ulLabelLen);
218
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_TLS_PRF_PARAMS, pOutput);
219
+ PKCS11_IMPLEMENT_ULONG_PTR_ACCESSOR(CK_TLS_PRF_PARAMS, pulOutputLen);
220
+
221
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_WTLS_RANDOM_DATA);
222
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_WTLS_RANDOM_DATA, pClientRandom, ulClientRandomLen);
223
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_WTLS_RANDOM_DATA, pServerRandom, ulServerRandomLen);
224
+
225
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_WTLS_MASTER_KEY_DERIVE_PARAMS);
226
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, pVersion);
227
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, DigestMechanism);
228
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_WTLS_MASTER_KEY_DERIVE_PARAMS, CK_WTLS_RANDOM_DATA, RandomInfo);
229
+
230
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_WTLS_PRF_PARAMS);
231
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_WTLS_PRF_PARAMS, pSeed, ulSeedLen);
232
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_WTLS_PRF_PARAMS, pLabel, ulLabelLen);
233
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_WTLS_PRF_PARAMS, pOutput);
234
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_WTLS_PRF_PARAMS, DigestMechanism);
235
+ PKCS11_IMPLEMENT_ULONG_PTR_ACCESSOR(CK_WTLS_PRF_PARAMS, pulOutputLen);
236
+
237
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_WTLS_KEY_MAT_OUT);
238
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_WTLS_KEY_MAT_OUT, pIV);
239
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_WTLS_KEY_MAT_OUT, hMacSecret);
240
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_WTLS_KEY_MAT_OUT, hKey);
241
+
242
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_WTLS_KEY_MAT_PARAMS);
243
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_WTLS_KEY_MAT_PARAMS, DigestMechanism);
244
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_WTLS_KEY_MAT_PARAMS, ulMacSizeInBits);
245
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_WTLS_KEY_MAT_PARAMS, ulKeySizeInBits);
246
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_WTLS_KEY_MAT_PARAMS, ulIVSizeInBits);
247
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_WTLS_KEY_MAT_PARAMS, ulSequenceNumber);
248
+ PKCS11_IMPLEMENT_BOOL_ACCESSOR(CK_WTLS_KEY_MAT_PARAMS, bIsExport);
249
+ PKCS11_IMPLEMENT_STRUCT_ACCESSOR(CK_WTLS_KEY_MAT_PARAMS, CK_WTLS_RANDOM_DATA, RandomInfo);
250
+ PKCS11_IMPLEMENT_STRUCT_PTR_ACCESSOR(CK_WTLS_KEY_MAT_PARAMS, CK_WTLS_KEY_MAT_OUT, pReturnedKeyMaterial);
251
+
252
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_CMS_SIG_PARAMS);
253
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_CMS_SIG_PARAMS, pContentType);
254
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_CMS_SIG_PARAMS, pRequestedAttributes, ulRequestedAttributesLen);
255
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_CMS_SIG_PARAMS, pRequiredAttributes, ulRequiredAttributesLen);
256
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_CMS_SIG_PARAMS, certificateHandle);
257
+ PKCS11_IMPLEMENT_STRUCT_PTR_ACCESSOR(CK_CMS_SIG_PARAMS, CK_MECHANISM, pSigningMechanism);
258
+ PKCS11_IMPLEMENT_STRUCT_PTR_ACCESSOR(CK_CMS_SIG_PARAMS, CK_MECHANISM, pDigestMechanism);
259
+
260
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_KEY_DERIVATION_STRING_DATA);
261
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_KEY_DERIVATION_STRING_DATA, pData, ulLen);
262
+
263
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_PKCS5_PBKD2_PARAMS);
264
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_PKCS5_PBKD2_PARAMS, pSaltSourceData, ulSaltSourceDataLen);
265
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_PKCS5_PBKD2_PARAMS, pPrfData, ulPrfDataLen);
266
+ PKCS11_IMPLEMENT_STRING_PTR_ACCESSOR(CK_PKCS5_PBKD2_PARAMS, pPassword);
267
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PKCS5_PBKD2_PARAMS, saltSource);
268
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PKCS5_PBKD2_PARAMS, iterations);
269
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_PKCS5_PBKD2_PARAMS, prf);
270
+ PKCS11_IMPLEMENT_ULONG_PTR_ACCESSOR(CK_PKCS5_PBKD2_PARAMS, ulPasswordLen);
271
+
272
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_OTP_PARAM);
273
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_OTP_PARAM, pValue, ulValueLen);
274
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_OTP_PARAM, type);
275
+
276
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_OTP_PARAMS);
277
+ PKCS11_IMPLEMENT_PKCS11_STRUCT_PTR_ARRAY_ACCESSOR(CK_OTP_PARAMS, CK_OTP_PARAM, pParams, ulCount);
278
+
279
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_OTP_SIGNATURE_INFO);
280
+ PKCS11_IMPLEMENT_PKCS11_STRUCT_PTR_ARRAY_ACCESSOR(CK_OTP_SIGNATURE_INFO, CK_OTP_PARAM, pParams, ulCount);
281
+
282
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_KIP_PARAMS);
283
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_KIP_PARAMS, pSeed, ulSeedLen);
284
+ PKCS11_IMPLEMENT_STRUCT_PTR_ACCESSOR(CK_KIP_PARAMS, CK_MECHANISM, pMechanism);
285
+ PKCS11_IMPLEMENT_HANDLE_ACCESSOR(CK_KIP_PARAMS, hKey);
286
+
287
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_AES_CTR_PARAMS);
288
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_AES_CTR_PARAMS, ulCounterBits);
289
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_AES_CTR_PARAMS, cb);
290
+
291
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_CAMELLIA_CTR_PARAMS);
292
+ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_CAMELLIA_CTR_PARAMS, ulCounterBits);
293
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_CAMELLIA_CTR_PARAMS, cb);
294
+
295
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS);
296
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, pData, length);
297
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS, iv);
298
+
299
+ PKCS11_IMPLEMENT_STRUCT_WITH_ALLOCATOR(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS);
300
+ PKCS11_IMPLEMENT_STRING_PTR_LEN_ACCESSOR(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, pData, length);
301
+ PKCS11_IMPLEMENT_STRING_ACCESSOR(CK_ARIA_CBC_ENCRYPT_DATA_PARAMS, iv);
302
+