pkcs11 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +2 -0
- data/History.txt +23 -0
- data/Manifest.txt +6 -0
- data/README.rdoc +28 -15
- data/Rakefile +51 -2
- data/ext/extconf.rb +1 -0
- data/ext/generate_structs.rb +157 -0
- data/ext/generate_thread_funcs.rb +72 -0
- data/ext/pk11.c +482 -252
- data/ext/pk11.h +4 -1
- data/ext/pk11_const.c +25 -476
- data/ext/pk11_const_def.inc +452 -0
- data/ext/pk11_struct_def.inc +304 -0
- data/ext/pk11_struct_impl.inc +304 -0
- data/ext/pk11_thread_funcs.c +411 -0
- data/ext/pk11_thread_funcs.h +482 -0
- data/lib/pkcs11.rb +5 -8
- data/lib/pkcs11/extensions.rb +17 -109
- data/lib/pkcs11/helper.rb +151 -0
- data/lib/pkcs11/library.rb +44 -13
- data/lib/pkcs11/object.rb +73 -17
- data/lib/pkcs11/session.rb +318 -121
- data/lib/pkcs11/slot.rb +30 -9
- data/test/helper.rb +13 -6
- data/test/test_pkcs11.rb +13 -2
- data/test/test_pkcs11_crypt.rb +38 -3
- data/test/test_pkcs11_object.rb +18 -4
- data/test/test_pkcs11_session.rb +28 -2
- data/test/test_pkcs11_slot.rb +9 -6
- data/test/test_pkcs11_structs.rb +134 -0
- data/test/test_pkcs11_thread.rb +45 -0
- metadata +40 -7
@@ -0,0 +1,482 @@
|
|
1
|
+
#ifndef EXT_PK11_THREAD_FUNCS_H
|
2
|
+
#define EXT_PK11_THREAD_FUNCS_H
|
3
|
+
#include "pk11.h"
|
4
|
+
#ifdef HAVE_RB_THREAD_BLOCKING_REGION
|
5
|
+
struct tbr_C_Initialize_params {
|
6
|
+
CK_C_Initialize func;
|
7
|
+
struct { CK_VOID_PTR pInitArgs; } params;
|
8
|
+
CK_RV retval;
|
9
|
+
};
|
10
|
+
VALUE tbf_C_Initialize( void *data );
|
11
|
+
|
12
|
+
struct tbr_C_Finalize_params {
|
13
|
+
CK_C_Finalize func;
|
14
|
+
struct { CK_VOID_PTR pReserved; } params;
|
15
|
+
CK_RV retval;
|
16
|
+
};
|
17
|
+
VALUE tbf_C_Finalize( void *data );
|
18
|
+
|
19
|
+
struct tbr_C_GetInfo_params {
|
20
|
+
CK_C_GetInfo func;
|
21
|
+
struct { CK_INFO_PTR pInfo; } params;
|
22
|
+
CK_RV retval;
|
23
|
+
};
|
24
|
+
VALUE tbf_C_GetInfo( void *data );
|
25
|
+
|
26
|
+
struct tbr_C_GetFunctionList_params {
|
27
|
+
CK_C_GetFunctionList func;
|
28
|
+
struct { CK_FUNCTION_LIST_PTR_PTR ppFunctionList; } params;
|
29
|
+
CK_RV retval;
|
30
|
+
};
|
31
|
+
VALUE tbf_C_GetFunctionList( void *data );
|
32
|
+
|
33
|
+
struct tbr_C_GetSlotList_params {
|
34
|
+
CK_C_GetSlotList func;
|
35
|
+
struct { CK_BBOOL tokenPresent;CK_SLOT_ID_PTR pSlotList;CK_ULONG_PTR pulCount; } params;
|
36
|
+
CK_RV retval;
|
37
|
+
};
|
38
|
+
VALUE tbf_C_GetSlotList( void *data );
|
39
|
+
|
40
|
+
struct tbr_C_GetSlotInfo_params {
|
41
|
+
CK_C_GetSlotInfo func;
|
42
|
+
struct { CK_SLOT_ID slotID;CK_SLOT_INFO_PTR pInfo; } params;
|
43
|
+
CK_RV retval;
|
44
|
+
};
|
45
|
+
VALUE tbf_C_GetSlotInfo( void *data );
|
46
|
+
|
47
|
+
struct tbr_C_GetTokenInfo_params {
|
48
|
+
CK_C_GetTokenInfo func;
|
49
|
+
struct { CK_SLOT_ID slotID;CK_TOKEN_INFO_PTR pInfo; } params;
|
50
|
+
CK_RV retval;
|
51
|
+
};
|
52
|
+
VALUE tbf_C_GetTokenInfo( void *data );
|
53
|
+
|
54
|
+
struct tbr_C_GetMechanismList_params {
|
55
|
+
CK_C_GetMechanismList func;
|
56
|
+
struct { CK_SLOT_ID slotID;CK_MECHANISM_TYPE_PTR pMechanismList;CK_ULONG_PTR pulCount; } params;
|
57
|
+
CK_RV retval;
|
58
|
+
};
|
59
|
+
VALUE tbf_C_GetMechanismList( void *data );
|
60
|
+
|
61
|
+
struct tbr_C_GetMechanismInfo_params {
|
62
|
+
CK_C_GetMechanismInfo func;
|
63
|
+
struct { CK_SLOT_ID slotID;CK_MECHANISM_TYPE type;CK_MECHANISM_INFO_PTR pInfo; } params;
|
64
|
+
CK_RV retval;
|
65
|
+
};
|
66
|
+
VALUE tbf_C_GetMechanismInfo( void *data );
|
67
|
+
|
68
|
+
struct tbr_C_InitToken_params {
|
69
|
+
CK_C_InitToken func;
|
70
|
+
struct { CK_SLOT_ID slotID;CK_UTF8CHAR_PTR pPin;CK_ULONG ulPinLen;CK_UTF8CHAR_PTR pLabel; } params;
|
71
|
+
CK_RV retval;
|
72
|
+
};
|
73
|
+
VALUE tbf_C_InitToken( void *data );
|
74
|
+
|
75
|
+
struct tbr_C_InitPIN_params {
|
76
|
+
CK_C_InitPIN func;
|
77
|
+
struct { CK_SESSION_HANDLE hSession;CK_UTF8CHAR_PTR pPin;CK_ULONG ulPinLen; } params;
|
78
|
+
CK_RV retval;
|
79
|
+
};
|
80
|
+
VALUE tbf_C_InitPIN( void *data );
|
81
|
+
|
82
|
+
struct tbr_C_SetPIN_params {
|
83
|
+
CK_C_SetPIN func;
|
84
|
+
struct { CK_SESSION_HANDLE hSession;CK_UTF8CHAR_PTR pOldPin;CK_ULONG ulOldLen;CK_UTF8CHAR_PTR pNewPin;CK_ULONG ulNewLen; } params;
|
85
|
+
CK_RV retval;
|
86
|
+
};
|
87
|
+
VALUE tbf_C_SetPIN( void *data );
|
88
|
+
|
89
|
+
struct tbr_C_OpenSession_params {
|
90
|
+
CK_C_OpenSession func;
|
91
|
+
struct { CK_SLOT_ID slotID;CK_FLAGS flags;CK_VOID_PTR pApplication;CK_NOTIFY Notify;CK_SESSION_HANDLE_PTR phSession; } params;
|
92
|
+
CK_RV retval;
|
93
|
+
};
|
94
|
+
VALUE tbf_C_OpenSession( void *data );
|
95
|
+
|
96
|
+
struct tbr_C_CloseSession_params {
|
97
|
+
CK_C_CloseSession func;
|
98
|
+
struct { CK_SESSION_HANDLE hSession; } params;
|
99
|
+
CK_RV retval;
|
100
|
+
};
|
101
|
+
VALUE tbf_C_CloseSession( void *data );
|
102
|
+
|
103
|
+
struct tbr_C_CloseAllSessions_params {
|
104
|
+
CK_C_CloseAllSessions func;
|
105
|
+
struct { CK_SLOT_ID slotID; } params;
|
106
|
+
CK_RV retval;
|
107
|
+
};
|
108
|
+
VALUE tbf_C_CloseAllSessions( void *data );
|
109
|
+
|
110
|
+
struct tbr_C_GetSessionInfo_params {
|
111
|
+
CK_C_GetSessionInfo func;
|
112
|
+
struct { CK_SESSION_HANDLE hSession;CK_SESSION_INFO_PTR pInfo; } params;
|
113
|
+
CK_RV retval;
|
114
|
+
};
|
115
|
+
VALUE tbf_C_GetSessionInfo( void *data );
|
116
|
+
|
117
|
+
struct tbr_C_GetOperationState_params {
|
118
|
+
CK_C_GetOperationState func;
|
119
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pOperationState;CK_ULONG_PTR pulOperationStateLen; } params;
|
120
|
+
CK_RV retval;
|
121
|
+
};
|
122
|
+
VALUE tbf_C_GetOperationState( void *data );
|
123
|
+
|
124
|
+
struct tbr_C_SetOperationState_params {
|
125
|
+
CK_C_SetOperationState func;
|
126
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pOperationState;CK_ULONG ulOperationStateLen;CK_OBJECT_HANDLE hEncryptionKey;CK_OBJECT_HANDLE hAuthenticationKey; } params;
|
127
|
+
CK_RV retval;
|
128
|
+
};
|
129
|
+
VALUE tbf_C_SetOperationState( void *data );
|
130
|
+
|
131
|
+
struct tbr_C_Login_params {
|
132
|
+
CK_C_Login func;
|
133
|
+
struct { CK_SESSION_HANDLE hSession;CK_USER_TYPE userType;CK_UTF8CHAR_PTR pPin;CK_ULONG ulPinLen; } params;
|
134
|
+
CK_RV retval;
|
135
|
+
};
|
136
|
+
VALUE tbf_C_Login( void *data );
|
137
|
+
|
138
|
+
struct tbr_C_Logout_params {
|
139
|
+
CK_C_Logout func;
|
140
|
+
struct { CK_SESSION_HANDLE hSession; } params;
|
141
|
+
CK_RV retval;
|
142
|
+
};
|
143
|
+
VALUE tbf_C_Logout( void *data );
|
144
|
+
|
145
|
+
struct tbr_C_CreateObject_params {
|
146
|
+
CK_C_CreateObject func;
|
147
|
+
struct { CK_SESSION_HANDLE hSession;CK_ATTRIBUTE_PTR pTemplate;CK_ULONG ulCount;CK_OBJECT_HANDLE_PTR phObject; } params;
|
148
|
+
CK_RV retval;
|
149
|
+
};
|
150
|
+
VALUE tbf_C_CreateObject( void *data );
|
151
|
+
|
152
|
+
struct tbr_C_CopyObject_params {
|
153
|
+
CK_C_CopyObject func;
|
154
|
+
struct { CK_SESSION_HANDLE hSession;CK_OBJECT_HANDLE hObject;CK_ATTRIBUTE_PTR pTemplate;CK_ULONG ulCount;CK_OBJECT_HANDLE_PTR phNewObject; } params;
|
155
|
+
CK_RV retval;
|
156
|
+
};
|
157
|
+
VALUE tbf_C_CopyObject( void *data );
|
158
|
+
|
159
|
+
struct tbr_C_DestroyObject_params {
|
160
|
+
CK_C_DestroyObject func;
|
161
|
+
struct { CK_SESSION_HANDLE hSession;CK_OBJECT_HANDLE hObject; } params;
|
162
|
+
CK_RV retval;
|
163
|
+
};
|
164
|
+
VALUE tbf_C_DestroyObject( void *data );
|
165
|
+
|
166
|
+
struct tbr_C_GetObjectSize_params {
|
167
|
+
CK_C_GetObjectSize func;
|
168
|
+
struct { CK_SESSION_HANDLE hSession;CK_OBJECT_HANDLE hObject;CK_ULONG_PTR pulSize; } params;
|
169
|
+
CK_RV retval;
|
170
|
+
};
|
171
|
+
VALUE tbf_C_GetObjectSize( void *data );
|
172
|
+
|
173
|
+
struct tbr_C_GetAttributeValue_params {
|
174
|
+
CK_C_GetAttributeValue func;
|
175
|
+
struct { CK_SESSION_HANDLE hSession;CK_OBJECT_HANDLE hObject;CK_ATTRIBUTE_PTR pTemplate;CK_ULONG ulCount; } params;
|
176
|
+
CK_RV retval;
|
177
|
+
};
|
178
|
+
VALUE tbf_C_GetAttributeValue( void *data );
|
179
|
+
|
180
|
+
struct tbr_C_SetAttributeValue_params {
|
181
|
+
CK_C_SetAttributeValue func;
|
182
|
+
struct { CK_SESSION_HANDLE hSession;CK_OBJECT_HANDLE hObject;CK_ATTRIBUTE_PTR pTemplate;CK_ULONG ulCount; } params;
|
183
|
+
CK_RV retval;
|
184
|
+
};
|
185
|
+
VALUE tbf_C_SetAttributeValue( void *data );
|
186
|
+
|
187
|
+
struct tbr_C_FindObjectsInit_params {
|
188
|
+
CK_C_FindObjectsInit func;
|
189
|
+
struct { CK_SESSION_HANDLE hSession;CK_ATTRIBUTE_PTR pTemplate;CK_ULONG ulCount; } params;
|
190
|
+
CK_RV retval;
|
191
|
+
};
|
192
|
+
VALUE tbf_C_FindObjectsInit( void *data );
|
193
|
+
|
194
|
+
struct tbr_C_FindObjects_params {
|
195
|
+
CK_C_FindObjects func;
|
196
|
+
struct { CK_SESSION_HANDLE hSession;CK_OBJECT_HANDLE_PTR phObject;CK_ULONG ulMaxObjectCount;CK_ULONG_PTR pulObjectCount; } params;
|
197
|
+
CK_RV retval;
|
198
|
+
};
|
199
|
+
VALUE tbf_C_FindObjects( void *data );
|
200
|
+
|
201
|
+
struct tbr_C_FindObjectsFinal_params {
|
202
|
+
CK_C_FindObjectsFinal func;
|
203
|
+
struct { CK_SESSION_HANDLE hSession; } params;
|
204
|
+
CK_RV retval;
|
205
|
+
};
|
206
|
+
VALUE tbf_C_FindObjectsFinal( void *data );
|
207
|
+
|
208
|
+
struct tbr_C_EncryptInit_params {
|
209
|
+
CK_C_EncryptInit func;
|
210
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hKey; } params;
|
211
|
+
CK_RV retval;
|
212
|
+
};
|
213
|
+
VALUE tbf_C_EncryptInit( void *data );
|
214
|
+
|
215
|
+
struct tbr_C_Encrypt_params {
|
216
|
+
CK_C_Encrypt func;
|
217
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pData;CK_ULONG ulDataLen;CK_BYTE_PTR pEncryptedData;CK_ULONG_PTR pulEncryptedDataLen; } params;
|
218
|
+
CK_RV retval;
|
219
|
+
};
|
220
|
+
VALUE tbf_C_Encrypt( void *data );
|
221
|
+
|
222
|
+
struct tbr_C_EncryptUpdate_params {
|
223
|
+
CK_C_EncryptUpdate func;
|
224
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pPart;CK_ULONG ulPartLen;CK_BYTE_PTR pEncryptedPart;CK_ULONG_PTR pulEncryptedPartLen; } params;
|
225
|
+
CK_RV retval;
|
226
|
+
};
|
227
|
+
VALUE tbf_C_EncryptUpdate( void *data );
|
228
|
+
|
229
|
+
struct tbr_C_EncryptFinal_params {
|
230
|
+
CK_C_EncryptFinal func;
|
231
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pLastEncryptedPart;CK_ULONG_PTR pulLastEncryptedPartLen; } params;
|
232
|
+
CK_RV retval;
|
233
|
+
};
|
234
|
+
VALUE tbf_C_EncryptFinal( void *data );
|
235
|
+
|
236
|
+
struct tbr_C_DecryptInit_params {
|
237
|
+
CK_C_DecryptInit func;
|
238
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hKey; } params;
|
239
|
+
CK_RV retval;
|
240
|
+
};
|
241
|
+
VALUE tbf_C_DecryptInit( void *data );
|
242
|
+
|
243
|
+
struct tbr_C_Decrypt_params {
|
244
|
+
CK_C_Decrypt func;
|
245
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pEncryptedData;CK_ULONG ulEncryptedDataLen;CK_BYTE_PTR pData;CK_ULONG_PTR pulDataLen; } params;
|
246
|
+
CK_RV retval;
|
247
|
+
};
|
248
|
+
VALUE tbf_C_Decrypt( void *data );
|
249
|
+
|
250
|
+
struct tbr_C_DecryptUpdate_params {
|
251
|
+
CK_C_DecryptUpdate func;
|
252
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pEncryptedPart;CK_ULONG ulEncryptedPartLen;CK_BYTE_PTR pPart;CK_ULONG_PTR pulPartLen; } params;
|
253
|
+
CK_RV retval;
|
254
|
+
};
|
255
|
+
VALUE tbf_C_DecryptUpdate( void *data );
|
256
|
+
|
257
|
+
struct tbr_C_DecryptFinal_params {
|
258
|
+
CK_C_DecryptFinal func;
|
259
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pLastPart;CK_ULONG_PTR pulLastPartLen; } params;
|
260
|
+
CK_RV retval;
|
261
|
+
};
|
262
|
+
VALUE tbf_C_DecryptFinal( void *data );
|
263
|
+
|
264
|
+
struct tbr_C_DigestInit_params {
|
265
|
+
CK_C_DigestInit func;
|
266
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism; } params;
|
267
|
+
CK_RV retval;
|
268
|
+
};
|
269
|
+
VALUE tbf_C_DigestInit( void *data );
|
270
|
+
|
271
|
+
struct tbr_C_Digest_params {
|
272
|
+
CK_C_Digest func;
|
273
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pData;CK_ULONG ulDataLen;CK_BYTE_PTR pDigest;CK_ULONG_PTR pulDigestLen; } params;
|
274
|
+
CK_RV retval;
|
275
|
+
};
|
276
|
+
VALUE tbf_C_Digest( void *data );
|
277
|
+
|
278
|
+
struct tbr_C_DigestUpdate_params {
|
279
|
+
CK_C_DigestUpdate func;
|
280
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pPart;CK_ULONG ulPartLen; } params;
|
281
|
+
CK_RV retval;
|
282
|
+
};
|
283
|
+
VALUE tbf_C_DigestUpdate( void *data );
|
284
|
+
|
285
|
+
struct tbr_C_DigestKey_params {
|
286
|
+
CK_C_DigestKey func;
|
287
|
+
struct { CK_SESSION_HANDLE hSession;CK_OBJECT_HANDLE hKey; } params;
|
288
|
+
CK_RV retval;
|
289
|
+
};
|
290
|
+
VALUE tbf_C_DigestKey( void *data );
|
291
|
+
|
292
|
+
struct tbr_C_DigestFinal_params {
|
293
|
+
CK_C_DigestFinal func;
|
294
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pDigest;CK_ULONG_PTR pulDigestLen; } params;
|
295
|
+
CK_RV retval;
|
296
|
+
};
|
297
|
+
VALUE tbf_C_DigestFinal( void *data );
|
298
|
+
|
299
|
+
struct tbr_C_SignInit_params {
|
300
|
+
CK_C_SignInit func;
|
301
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hKey; } params;
|
302
|
+
CK_RV retval;
|
303
|
+
};
|
304
|
+
VALUE tbf_C_SignInit( void *data );
|
305
|
+
|
306
|
+
struct tbr_C_Sign_params {
|
307
|
+
CK_C_Sign func;
|
308
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pData;CK_ULONG ulDataLen;CK_BYTE_PTR pSignature;CK_ULONG_PTR pulSignatureLen; } params;
|
309
|
+
CK_RV retval;
|
310
|
+
};
|
311
|
+
VALUE tbf_C_Sign( void *data );
|
312
|
+
|
313
|
+
struct tbr_C_SignUpdate_params {
|
314
|
+
CK_C_SignUpdate func;
|
315
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pPart;CK_ULONG ulPartLen; } params;
|
316
|
+
CK_RV retval;
|
317
|
+
};
|
318
|
+
VALUE tbf_C_SignUpdate( void *data );
|
319
|
+
|
320
|
+
struct tbr_C_SignFinal_params {
|
321
|
+
CK_C_SignFinal func;
|
322
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pSignature;CK_ULONG_PTR pulSignatureLen; } params;
|
323
|
+
CK_RV retval;
|
324
|
+
};
|
325
|
+
VALUE tbf_C_SignFinal( void *data );
|
326
|
+
|
327
|
+
struct tbr_C_SignRecoverInit_params {
|
328
|
+
CK_C_SignRecoverInit func;
|
329
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hKey; } params;
|
330
|
+
CK_RV retval;
|
331
|
+
};
|
332
|
+
VALUE tbf_C_SignRecoverInit( void *data );
|
333
|
+
|
334
|
+
struct tbr_C_SignRecover_params {
|
335
|
+
CK_C_SignRecover func;
|
336
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pData;CK_ULONG ulDataLen;CK_BYTE_PTR pSignature;CK_ULONG_PTR pulSignatureLen; } params;
|
337
|
+
CK_RV retval;
|
338
|
+
};
|
339
|
+
VALUE tbf_C_SignRecover( void *data );
|
340
|
+
|
341
|
+
struct tbr_C_VerifyInit_params {
|
342
|
+
CK_C_VerifyInit func;
|
343
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hKey; } params;
|
344
|
+
CK_RV retval;
|
345
|
+
};
|
346
|
+
VALUE tbf_C_VerifyInit( void *data );
|
347
|
+
|
348
|
+
struct tbr_C_Verify_params {
|
349
|
+
CK_C_Verify func;
|
350
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pData;CK_ULONG ulDataLen;CK_BYTE_PTR pSignature;CK_ULONG ulSignatureLen; } params;
|
351
|
+
CK_RV retval;
|
352
|
+
};
|
353
|
+
VALUE tbf_C_Verify( void *data );
|
354
|
+
|
355
|
+
struct tbr_C_VerifyUpdate_params {
|
356
|
+
CK_C_VerifyUpdate func;
|
357
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pPart;CK_ULONG ulPartLen; } params;
|
358
|
+
CK_RV retval;
|
359
|
+
};
|
360
|
+
VALUE tbf_C_VerifyUpdate( void *data );
|
361
|
+
|
362
|
+
struct tbr_C_VerifyFinal_params {
|
363
|
+
CK_C_VerifyFinal func;
|
364
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pSignature;CK_ULONG ulSignatureLen; } params;
|
365
|
+
CK_RV retval;
|
366
|
+
};
|
367
|
+
VALUE tbf_C_VerifyFinal( void *data );
|
368
|
+
|
369
|
+
struct tbr_C_VerifyRecoverInit_params {
|
370
|
+
CK_C_VerifyRecoverInit func;
|
371
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hKey; } params;
|
372
|
+
CK_RV retval;
|
373
|
+
};
|
374
|
+
VALUE tbf_C_VerifyRecoverInit( void *data );
|
375
|
+
|
376
|
+
struct tbr_C_VerifyRecover_params {
|
377
|
+
CK_C_VerifyRecover func;
|
378
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pSignature;CK_ULONG ulSignatureLen;CK_BYTE_PTR pData;CK_ULONG_PTR pulDataLen; } params;
|
379
|
+
CK_RV retval;
|
380
|
+
};
|
381
|
+
VALUE tbf_C_VerifyRecover( void *data );
|
382
|
+
|
383
|
+
struct tbr_C_DigestEncryptUpdate_params {
|
384
|
+
CK_C_DigestEncryptUpdate func;
|
385
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pPart;CK_ULONG ulPartLen;CK_BYTE_PTR pEncryptedPart;CK_ULONG_PTR pulEncryptedPartLen; } params;
|
386
|
+
CK_RV retval;
|
387
|
+
};
|
388
|
+
VALUE tbf_C_DigestEncryptUpdate( void *data );
|
389
|
+
|
390
|
+
struct tbr_C_DecryptDigestUpdate_params {
|
391
|
+
CK_C_DecryptDigestUpdate func;
|
392
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pEncryptedPart;CK_ULONG ulEncryptedPartLen;CK_BYTE_PTR pPart;CK_ULONG_PTR pulPartLen; } params;
|
393
|
+
CK_RV retval;
|
394
|
+
};
|
395
|
+
VALUE tbf_C_DecryptDigestUpdate( void *data );
|
396
|
+
|
397
|
+
struct tbr_C_SignEncryptUpdate_params {
|
398
|
+
CK_C_SignEncryptUpdate func;
|
399
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pPart;CK_ULONG ulPartLen;CK_BYTE_PTR pEncryptedPart;CK_ULONG_PTR pulEncryptedPartLen; } params;
|
400
|
+
CK_RV retval;
|
401
|
+
};
|
402
|
+
VALUE tbf_C_SignEncryptUpdate( void *data );
|
403
|
+
|
404
|
+
struct tbr_C_DecryptVerifyUpdate_params {
|
405
|
+
CK_C_DecryptVerifyUpdate func;
|
406
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pEncryptedPart;CK_ULONG ulEncryptedPartLen;CK_BYTE_PTR pPart;CK_ULONG_PTR pulPartLen; } params;
|
407
|
+
CK_RV retval;
|
408
|
+
};
|
409
|
+
VALUE tbf_C_DecryptVerifyUpdate( void *data );
|
410
|
+
|
411
|
+
struct tbr_C_GenerateKey_params {
|
412
|
+
CK_C_GenerateKey func;
|
413
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_ATTRIBUTE_PTR pTemplate;CK_ULONG ulCount;CK_OBJECT_HANDLE_PTR phKey; } params;
|
414
|
+
CK_RV retval;
|
415
|
+
};
|
416
|
+
VALUE tbf_C_GenerateKey( void *data );
|
417
|
+
|
418
|
+
struct tbr_C_GenerateKeyPair_params {
|
419
|
+
CK_C_GenerateKeyPair func;
|
420
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_ATTRIBUTE_PTR pPublicKeyTemplate;CK_ULONG ulPublicKeyAttributeCount;CK_ATTRIBUTE_PTR pPrivateKeyTemplate;CK_ULONG ulPrivateKeyAttributeCount;CK_OBJECT_HANDLE_PTR phPublicKey;CK_OBJECT_HANDLE_PTR phPrivateKey; } params;
|
421
|
+
CK_RV retval;
|
422
|
+
};
|
423
|
+
VALUE tbf_C_GenerateKeyPair( void *data );
|
424
|
+
|
425
|
+
struct tbr_C_WrapKey_params {
|
426
|
+
CK_C_WrapKey func;
|
427
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hWrappingKey;CK_OBJECT_HANDLE hKey;CK_BYTE_PTR pWrappedKey;CK_ULONG_PTR pulWrappedKeyLen; } params;
|
428
|
+
CK_RV retval;
|
429
|
+
};
|
430
|
+
VALUE tbf_C_WrapKey( void *data );
|
431
|
+
|
432
|
+
struct tbr_C_UnwrapKey_params {
|
433
|
+
CK_C_UnwrapKey func;
|
434
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hUnwrappingKey;CK_BYTE_PTR pWrappedKey;CK_ULONG ulWrappedKeyLen;CK_ATTRIBUTE_PTR pTemplate;CK_ULONG ulAttributeCount;CK_OBJECT_HANDLE_PTR phKey; } params;
|
435
|
+
CK_RV retval;
|
436
|
+
};
|
437
|
+
VALUE tbf_C_UnwrapKey( void *data );
|
438
|
+
|
439
|
+
struct tbr_C_DeriveKey_params {
|
440
|
+
CK_C_DeriveKey func;
|
441
|
+
struct { CK_SESSION_HANDLE hSession;CK_MECHANISM_PTR pMechanism;CK_OBJECT_HANDLE hBaseKey;CK_ATTRIBUTE_PTR pTemplate;CK_ULONG ulAttributeCount;CK_OBJECT_HANDLE_PTR phKey; } params;
|
442
|
+
CK_RV retval;
|
443
|
+
};
|
444
|
+
VALUE tbf_C_DeriveKey( void *data );
|
445
|
+
|
446
|
+
struct tbr_C_SeedRandom_params {
|
447
|
+
CK_C_SeedRandom func;
|
448
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR pSeed;CK_ULONG ulSeedLen; } params;
|
449
|
+
CK_RV retval;
|
450
|
+
};
|
451
|
+
VALUE tbf_C_SeedRandom( void *data );
|
452
|
+
|
453
|
+
struct tbr_C_GenerateRandom_params {
|
454
|
+
CK_C_GenerateRandom func;
|
455
|
+
struct { CK_SESSION_HANDLE hSession;CK_BYTE_PTR RandomData;CK_ULONG ulRandomLen; } params;
|
456
|
+
CK_RV retval;
|
457
|
+
};
|
458
|
+
VALUE tbf_C_GenerateRandom( void *data );
|
459
|
+
|
460
|
+
struct tbr_C_GetFunctionStatus_params {
|
461
|
+
CK_C_GetFunctionStatus func;
|
462
|
+
struct { CK_SESSION_HANDLE hSession; } params;
|
463
|
+
CK_RV retval;
|
464
|
+
};
|
465
|
+
VALUE tbf_C_GetFunctionStatus( void *data );
|
466
|
+
|
467
|
+
struct tbr_C_CancelFunction_params {
|
468
|
+
CK_C_CancelFunction func;
|
469
|
+
struct { CK_SESSION_HANDLE hSession; } params;
|
470
|
+
CK_RV retval;
|
471
|
+
};
|
472
|
+
VALUE tbf_C_CancelFunction( void *data );
|
473
|
+
|
474
|
+
struct tbr_C_WaitForSlotEvent_params {
|
475
|
+
CK_C_WaitForSlotEvent func;
|
476
|
+
struct { CK_FLAGS flags;CK_SLOT_ID_PTR pSlot;CK_VOID_PTR pRserved; } params;
|
477
|
+
CK_RV retval;
|
478
|
+
};
|
479
|
+
VALUE tbf_C_WaitForSlotEvent( void *data );
|
480
|
+
|
481
|
+
#endif
|
482
|
+
#endif
|