pkcs11 0.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +23 -0
- data/History.txt +3 -0
- data/MIT-LICENSE +22 -0
- data/Manifest.txt +34 -0
- data/README.rdoc +156 -0
- data/Rakefile +36 -0
- data/ext/extconf.rb +6 -0
- data/ext/include/cryptoki.h +66 -0
- data/ext/include/ct-kip.h +50 -0
- data/ext/include/otp-pkcs11.h +125 -0
- data/ext/include/pkcs-11v2-20a3.h +124 -0
- data/ext/include/pkcs11.h +299 -0
- data/ext/include/pkcs11f.h +912 -0
- data/ext/include/pkcs11t.h +1885 -0
- data/ext/pk11.c +1737 -0
- data/ext/pk11.h +78 -0
- data/ext/pk11_const.c +680 -0
- data/lib/1.8/pkcs11_ext.so +0 -0
- data/lib/1.9/pkcs11_ext.so +0 -0
- data/lib/pkcs11.rb +12 -0
- data/lib/pkcs11/extensions.rb +160 -0
- data/lib/pkcs11/library.rb +63 -0
- data/lib/pkcs11/object.rb +104 -0
- data/lib/pkcs11/session.rb +568 -0
- data/lib/pkcs11/slot.rb +90 -0
- data/sample/firefox_certs.rb +90 -0
- data/sample/nssckbi.rb +51 -0
- data/test/fixtures/softokn/cert8.db +0 -0
- data/test/fixtures/softokn/key3.db +0 -0
- data/test/fixtures/softokn/secmod.db +0 -0
- data/test/helper.rb +43 -0
- data/test/test_pkcs11.rb +36 -0
- data/test/test_pkcs11_crypt.rb +167 -0
- data/test/test_pkcs11_object.rb +94 -0
- data/test/test_pkcs11_session.rb +97 -0
- data/test/test_pkcs11_slot.rb +66 -0
- metadata +122 -0
data/ext/pk11.h
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
#ifndef RUBY_PK11_H
|
2
|
+
#define RUBY_PK11_H
|
3
|
+
#include <ruby.h>
|
4
|
+
|
5
|
+
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
6
|
+
#define compile_for_windows
|
7
|
+
#endif
|
8
|
+
|
9
|
+
#if !defined(RARRAY_LEN)
|
10
|
+
# define RARRAY_LEN(ary) (RARRAY(ary)->len)
|
11
|
+
#endif
|
12
|
+
#if !defined(RSTRING_LEN)
|
13
|
+
# define RSTRING_LEN(str) (RSTRING(str)->len)
|
14
|
+
#endif
|
15
|
+
#if !defined(RSTRING_PTR)
|
16
|
+
# define RSTRING_PTR(str) (RSTRING(str)->ptr)
|
17
|
+
#endif
|
18
|
+
|
19
|
+
#ifndef HAVE_RB_STR_SET_LEN
|
20
|
+
#define rb_str_set_len(str, length) do { \
|
21
|
+
RSTRING(str)->ptr[length] = 0; \
|
22
|
+
RSTRING(str)->len = length; \
|
23
|
+
} while(0)
|
24
|
+
#endif
|
25
|
+
|
26
|
+
void Init_pkcs11_ext();
|
27
|
+
void Init_pkcs11_const(VALUE);
|
28
|
+
|
29
|
+
#ifdef compile_for_windows
|
30
|
+
#pragma pack(push, cryptoki, 1)
|
31
|
+
#ifdef __MINGW32_VERSION
|
32
|
+
/* avoid warning about ignored ‘dllimport’ attribute on mingw32*/
|
33
|
+
#define CK_IMPORT_SPEC __declspec()
|
34
|
+
#else
|
35
|
+
#define CK_IMPORT_SPEC __declspec(dllimport)
|
36
|
+
#endif
|
37
|
+
/* Define CRYPTOKI_EXPORTS during the build of cryptoki
|
38
|
+
* libraries. Do not define it in applications.
|
39
|
+
*/
|
40
|
+
#ifdef CRYPTOKI_EXPORTS
|
41
|
+
#define CK_EXPORT_SPEC __declspec(dllexport)
|
42
|
+
#else
|
43
|
+
#define CK_EXPORT_SPEC CK_IMPORT_SPEC
|
44
|
+
#endif
|
45
|
+
/* Ensures the calling convention for Win32 builds */
|
46
|
+
#define CK_CALL_SPEC __cdecl
|
47
|
+
#define CK_PTR *
|
48
|
+
#define CK_DEFINE_FUNCTION(returnType, name) \
|
49
|
+
returnType CK_EXPORT_SPEC CK_CALL_SPEC name
|
50
|
+
#define CK_DECLARE_FUNCTION(returnType, name) \
|
51
|
+
returnType CK_EXPORT_SPEC CK_CALL_SPEC name
|
52
|
+
#define CK_DECLARE_FUNCTION_POINTER(returnType, name) \
|
53
|
+
returnType CK_IMPORT_SPEC (CK_CALL_SPEC CK_PTR name)
|
54
|
+
#define CK_CALLBACK_FUNCTION(returnType, name) \
|
55
|
+
returnType (CK_CALL_SPEC CK_PTR name)
|
56
|
+
#ifndef NULL_PTR
|
57
|
+
#define NULL_PTR 0
|
58
|
+
#endif
|
59
|
+
|
60
|
+
#else
|
61
|
+
|
62
|
+
/* unix defns for pkcs11.h */
|
63
|
+
#define CK_PTR *
|
64
|
+
#define CK_DEFINE_FUNCTION(returnType, name) returnType name
|
65
|
+
#define CK_DECLARE_FUNCTION(returnType, name) returnType name
|
66
|
+
#define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType (* name)
|
67
|
+
#define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name)
|
68
|
+
#ifndef NULL_PTR
|
69
|
+
#define NULL_PTR 0
|
70
|
+
#endif
|
71
|
+
|
72
|
+
#endif
|
73
|
+
|
74
|
+
#include "pkcs11.h"
|
75
|
+
#include "otp-pkcs11.h" /* for PKCS #11 v2.20 Amendment 1 */
|
76
|
+
#include "ct-kip.h" /* for PKCS #11 v2.20 Amendment 2 */
|
77
|
+
#include "pkcs-11v2-20a3.h" /* for PKCS #11 v2.20 Amendment 3 */
|
78
|
+
#endif
|
data/ext/pk11_const.c
ADDED
@@ -0,0 +1,680 @@
|
|
1
|
+
#include "pk11.h"
|
2
|
+
|
3
|
+
#define PKCS11_DEFINE_CONST(constant) \
|
4
|
+
rb_define_const(cPKCS11, #constant, INT2NUM(constant))
|
5
|
+
|
6
|
+
#define PKCS11_DEFINE_CONST_GROUP(group, name, value) \
|
7
|
+
do { \
|
8
|
+
VALUE rvalue = ULONG2NUM(value); \
|
9
|
+
VALUE str = rb_obj_freeze(rb_str_new2(name)); \
|
10
|
+
VALUE old = rb_hash_aref(group, rvalue); \
|
11
|
+
if (!NIL_P(old)) rb_warning("%s is equal to %s", RSTRING_PTR(old), name); \
|
12
|
+
rb_hash_aset(group, rvalue, str); \
|
13
|
+
rb_define_const(cPKCS11, name, rvalue); \
|
14
|
+
} while(0)
|
15
|
+
|
16
|
+
#define PKCS11_DEFINE_OBJECT_CLASS(constant) \
|
17
|
+
PKCS11_DEFINE_CONST_GROUP(vOBJECT_CLASSES, #constant, constant)
|
18
|
+
#define PKCS11_DEFINE_ATTRIBUTE(constant) \
|
19
|
+
PKCS11_DEFINE_CONST_GROUP(vATTRIBUTES, #constant, constant)
|
20
|
+
#define PKCS11_DEFINE_MECHANISM(constant) \
|
21
|
+
PKCS11_DEFINE_CONST_GROUP(vMECHANISMS, #constant, constant)
|
22
|
+
#define PKCS11_DEFINE_RETURN_VALUE(constant) \
|
23
|
+
PKCS11_DEFINE_CONST_GROUP(vRETURN_VALUES, #constant, constant)
|
24
|
+
|
25
|
+
static VALUE vOBJECT_CLASSES;
|
26
|
+
static VALUE vATTRIBUTES;
|
27
|
+
static VALUE vMECHANISMS;
|
28
|
+
static VALUE vRETURN_VALUES;
|
29
|
+
|
30
|
+
VALUE
|
31
|
+
pkcs11_return_value_to_name(CK_RV rv)
|
32
|
+
{
|
33
|
+
VALUE name;
|
34
|
+
|
35
|
+
name = rb_hash_aref(vRETURN_VALUES, INT2NUM(rv));
|
36
|
+
if (NIL_P(name)){
|
37
|
+
char buf[16];
|
38
|
+
snprintf(buf, sizeof(buf), "0x%08x", (unsigned int)rv);
|
39
|
+
name = rb_obj_freeze(rb_str_new2(buf));
|
40
|
+
}
|
41
|
+
|
42
|
+
return name;
|
43
|
+
}
|
44
|
+
|
45
|
+
void
|
46
|
+
Init_pkcs11_const(VALUE cPKCS11)
|
47
|
+
{
|
48
|
+
PKCS11_DEFINE_CONST(CRYPTOKI_VERSION_MAJOR);
|
49
|
+
PKCS11_DEFINE_CONST(CRYPTOKI_VERSION_MINOR);
|
50
|
+
PKCS11_DEFINE_CONST(CRYPTOKI_VERSION_AMENDMENT);
|
51
|
+
|
52
|
+
/* General constant */
|
53
|
+
PKCS11_DEFINE_CONST(CK_UNAVAILABLE_INFORMATION);
|
54
|
+
PKCS11_DEFINE_CONST(CK_EFFECTIVELY_INFINITE);
|
55
|
+
PKCS11_DEFINE_CONST(CK_INVALID_HANDLE);
|
56
|
+
|
57
|
+
/* Notification */
|
58
|
+
PKCS11_DEFINE_CONST(CKN_SURRENDER);
|
59
|
+
|
60
|
+
/* Bit flag */
|
61
|
+
PKCS11_DEFINE_CONST(CKF_TOKEN_PRESENT);
|
62
|
+
PKCS11_DEFINE_CONST(CKF_REMOVABLE_DEVICE);
|
63
|
+
PKCS11_DEFINE_CONST(CKF_HW_SLOT);
|
64
|
+
PKCS11_DEFINE_CONST(CKF_RNG);
|
65
|
+
PKCS11_DEFINE_CONST(CKF_WRITE_PROTECTED);
|
66
|
+
PKCS11_DEFINE_CONST(CKF_LOGIN_REQUIRED);
|
67
|
+
PKCS11_DEFINE_CONST(CKF_USER_PIN_INITIALIZED);
|
68
|
+
PKCS11_DEFINE_CONST(CKF_RESTORE_KEY_NOT_NEEDED);
|
69
|
+
PKCS11_DEFINE_CONST(CKF_CLOCK_ON_TOKEN);
|
70
|
+
PKCS11_DEFINE_CONST(CKF_PROTECTED_AUTHENTICATION_PATH);
|
71
|
+
PKCS11_DEFINE_CONST(CKF_DUAL_CRYPTO_OPERATIONS);
|
72
|
+
PKCS11_DEFINE_CONST(CKF_TOKEN_INITIALIZED);
|
73
|
+
PKCS11_DEFINE_CONST(CKF_SECONDARY_AUTHENTICATION);
|
74
|
+
PKCS11_DEFINE_CONST(CKF_USER_PIN_COUNT_LOW);
|
75
|
+
PKCS11_DEFINE_CONST(CKF_USER_PIN_FINAL_TRY);
|
76
|
+
PKCS11_DEFINE_CONST(CKF_USER_PIN_LOCKED);
|
77
|
+
PKCS11_DEFINE_CONST(CKF_USER_PIN_TO_BE_CHANGED);
|
78
|
+
PKCS11_DEFINE_CONST(CKF_SO_PIN_COUNT_LOW);
|
79
|
+
PKCS11_DEFINE_CONST(CKF_SO_PIN_FINAL_TRY);
|
80
|
+
PKCS11_DEFINE_CONST(CKF_SO_PIN_LOCKED);
|
81
|
+
PKCS11_DEFINE_CONST(CKF_SO_PIN_TO_BE_CHANGED);
|
82
|
+
PKCS11_DEFINE_CONST(CKF_RW_SESSION);
|
83
|
+
PKCS11_DEFINE_CONST(CKF_SERIAL_SESSION);
|
84
|
+
PKCS11_DEFINE_CONST(CKF_LIBRARY_CANT_CREATE_OS_THREADS);
|
85
|
+
PKCS11_DEFINE_CONST(CKF_OS_LOCKING_OK);
|
86
|
+
PKCS11_DEFINE_CONST(CKF_DONT_BLOCK);
|
87
|
+
PKCS11_DEFINE_CONST(CKF_HW);
|
88
|
+
PKCS11_DEFINE_CONST(CKF_ENCRYPT);
|
89
|
+
PKCS11_DEFINE_CONST(CKF_DECRYPT);
|
90
|
+
PKCS11_DEFINE_CONST(CKF_DIGEST);
|
91
|
+
PKCS11_DEFINE_CONST(CKF_SIGN);
|
92
|
+
PKCS11_DEFINE_CONST(CKF_SIGN_RECOVER);
|
93
|
+
PKCS11_DEFINE_CONST(CKF_VERIFY);
|
94
|
+
PKCS11_DEFINE_CONST(CKF_VERIFY_RECOVER);
|
95
|
+
PKCS11_DEFINE_CONST(CKF_GENERATE);
|
96
|
+
PKCS11_DEFINE_CONST(CKF_GENERATE_KEY_PAIR);
|
97
|
+
PKCS11_DEFINE_CONST(CKF_WRAP);
|
98
|
+
PKCS11_DEFINE_CONST(CKF_UNWRAP);
|
99
|
+
PKCS11_DEFINE_CONST(CKF_DERIVE);
|
100
|
+
PKCS11_DEFINE_CONST(CKF_EC_F_P);
|
101
|
+
PKCS11_DEFINE_CONST(CKF_EC_F_2M);
|
102
|
+
PKCS11_DEFINE_CONST(CKF_EC_ECPARAMETERS);
|
103
|
+
PKCS11_DEFINE_CONST(CKF_EC_NAMEDCURVE);
|
104
|
+
PKCS11_DEFINE_CONST(CKF_EC_UNCOMPRESS);
|
105
|
+
PKCS11_DEFINE_CONST(CKF_EC_COMPRESS);
|
106
|
+
PKCS11_DEFINE_CONST(CKF_EXTENSION);
|
107
|
+
PKCS11_DEFINE_CONST(CKF_ARRAY_ATTRIBUTE);
|
108
|
+
PKCS11_DEFINE_CONST(CKF_EXCLUDE_CHALLENGE);
|
109
|
+
PKCS11_DEFINE_CONST(CKF_EXCLUDE_COUNTER);
|
110
|
+
PKCS11_DEFINE_CONST(CKF_EXCLUDE_PIN);
|
111
|
+
PKCS11_DEFINE_CONST(CKF_EXCLUDE_TIME);
|
112
|
+
PKCS11_DEFINE_CONST(CKF_NEXT_OTP);
|
113
|
+
PKCS11_DEFINE_CONST(CKF_USER_FRIENDLY_OTP);
|
114
|
+
|
115
|
+
/* User type */
|
116
|
+
PKCS11_DEFINE_CONST(CKU_SO);
|
117
|
+
PKCS11_DEFINE_CONST(CKU_USER);
|
118
|
+
PKCS11_DEFINE_CONST(CKU_CONTEXT_SPECIFIC);
|
119
|
+
|
120
|
+
/* Hardware feature type */
|
121
|
+
PKCS11_DEFINE_CONST(CKH_MONOTONIC_COUNTER);
|
122
|
+
PKCS11_DEFINE_CONST(CKH_CLOCK);
|
123
|
+
PKCS11_DEFINE_CONST(CKH_USER_INTERFACE);
|
124
|
+
PKCS11_DEFINE_CONST(CKH_VENDOR_DEFINED);
|
125
|
+
|
126
|
+
/* Key type */
|
127
|
+
PKCS11_DEFINE_CONST(CKK_RSA);
|
128
|
+
PKCS11_DEFINE_CONST(CKK_DSA);
|
129
|
+
PKCS11_DEFINE_CONST(CKK_DH);
|
130
|
+
PKCS11_DEFINE_CONST(CKK_ECDSA);
|
131
|
+
PKCS11_DEFINE_CONST(CKK_EC);
|
132
|
+
PKCS11_DEFINE_CONST(CKK_X9_42_DH);
|
133
|
+
PKCS11_DEFINE_CONST(CKK_KEA);
|
134
|
+
PKCS11_DEFINE_CONST(CKK_GENERIC_SECRET);
|
135
|
+
PKCS11_DEFINE_CONST(CKK_RC2);
|
136
|
+
PKCS11_DEFINE_CONST(CKK_RC4);
|
137
|
+
PKCS11_DEFINE_CONST(CKK_DES);
|
138
|
+
PKCS11_DEFINE_CONST(CKK_DES2);
|
139
|
+
PKCS11_DEFINE_CONST(CKK_DES3);
|
140
|
+
PKCS11_DEFINE_CONST(CKK_CAST);
|
141
|
+
PKCS11_DEFINE_CONST(CKK_CAST3);
|
142
|
+
PKCS11_DEFINE_CONST(CKK_CAST5);
|
143
|
+
PKCS11_DEFINE_CONST(CKK_CAST128);
|
144
|
+
PKCS11_DEFINE_CONST(CKK_RC5);
|
145
|
+
PKCS11_DEFINE_CONST(CKK_IDEA);
|
146
|
+
PKCS11_DEFINE_CONST(CKK_SKIPJACK);
|
147
|
+
PKCS11_DEFINE_CONST(CKK_BATON);
|
148
|
+
PKCS11_DEFINE_CONST(CKK_JUNIPER);
|
149
|
+
PKCS11_DEFINE_CONST(CKK_CDMF);
|
150
|
+
PKCS11_DEFINE_CONST(CKK_AES);
|
151
|
+
PKCS11_DEFINE_CONST(CKK_ACTI);
|
152
|
+
PKCS11_DEFINE_CONST(CKK_ARIA);
|
153
|
+
PKCS11_DEFINE_CONST(CKK_BLOWFISH);
|
154
|
+
PKCS11_DEFINE_CONST(CKK_CAMELLIA);
|
155
|
+
PKCS11_DEFINE_CONST(CKK_HOTP);
|
156
|
+
PKCS11_DEFINE_CONST(CKK_SECURID);
|
157
|
+
PKCS11_DEFINE_CONST(CKK_TWOFISH);
|
158
|
+
PKCS11_DEFINE_CONST(CKK_VENDOR_DEFINED);
|
159
|
+
|
160
|
+
/* Certificate type */
|
161
|
+
PKCS11_DEFINE_CONST(CKC_X_509);
|
162
|
+
PKCS11_DEFINE_CONST(CKC_X_509_ATTR_CERT);
|
163
|
+
PKCS11_DEFINE_CONST(CKC_WTLS);
|
164
|
+
PKCS11_DEFINE_CONST(CKC_VENDOR_DEFINED);
|
165
|
+
|
166
|
+
/* Session state */
|
167
|
+
PKCS11_DEFINE_CONST(CKS_RO_PUBLIC_SESSION);
|
168
|
+
PKCS11_DEFINE_CONST(CKS_RO_USER_FUNCTIONS);
|
169
|
+
PKCS11_DEFINE_CONST(CKS_RW_PUBLIC_SESSION);
|
170
|
+
PKCS11_DEFINE_CONST(CKS_RW_USER_FUNCTIONS);
|
171
|
+
PKCS11_DEFINE_CONST(CKS_RW_SO_FUNCTIONS);
|
172
|
+
|
173
|
+
/* Mask generation function */
|
174
|
+
PKCS11_DEFINE_CONST(CKG_MGF1_SHA1);
|
175
|
+
PKCS11_DEFINE_CONST(CKG_MGF1_SHA224);
|
176
|
+
PKCS11_DEFINE_CONST(CKG_MGF1_SHA256);
|
177
|
+
PKCS11_DEFINE_CONST(CKG_MGF1_SHA384);
|
178
|
+
PKCS11_DEFINE_CONST(CKG_MGF1_SHA512);
|
179
|
+
|
180
|
+
/* Key delivation function */
|
181
|
+
PKCS11_DEFINE_CONST(CKD_NULL);
|
182
|
+
PKCS11_DEFINE_CONST(CKD_SHA1_KDF);
|
183
|
+
PKCS11_DEFINE_CONST(CKD_SHA1_KDF_ASN1);
|
184
|
+
PKCS11_DEFINE_CONST(CKD_SHA1_KDF_CONCATENATE);
|
185
|
+
|
186
|
+
/* Pseudo-random function */
|
187
|
+
PKCS11_DEFINE_CONST(CKP_PKCS5_PBKD2_HMAC_SHA1);
|
188
|
+
|
189
|
+
/* Salt/Encoding parameter store */
|
190
|
+
PKCS11_DEFINE_CONST(CKZ_DATA_SPECIFIED);
|
191
|
+
PKCS11_DEFINE_CONST(CKZ_SALT_SPECIFIED);
|
192
|
+
|
193
|
+
vOBJECT_CLASSES = rb_hash_new();
|
194
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_DATA);
|
195
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_CERTIFICATE);
|
196
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_PUBLIC_KEY);
|
197
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_PRIVATE_KEY);
|
198
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_SECRET_KEY);
|
199
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_HW_FEATURE);
|
200
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_DOMAIN_PARAMETERS);
|
201
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_MECHANISM);
|
202
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_OTP_KEY);
|
203
|
+
PKCS11_DEFINE_OBJECT_CLASS(CKO_VENDOR_DEFINED);
|
204
|
+
rb_obj_freeze(vOBJECT_CLASSES);
|
205
|
+
rb_define_const(cPKCS11, "OBJECT_CLASSES", vOBJECT_CLASSES);
|
206
|
+
|
207
|
+
vATTRIBUTES = rb_hash_new();
|
208
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_CLASS);
|
209
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_TOKEN);
|
210
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PRIVATE);
|
211
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_LABEL);
|
212
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_APPLICATION);
|
213
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_VALUE);
|
214
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OBJECT_ID);
|
215
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_CERTIFICATE_TYPE);
|
216
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ISSUER);
|
217
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SERIAL_NUMBER);
|
218
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_AC_ISSUER);
|
219
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OWNER);
|
220
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ATTR_TYPES);
|
221
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_TRUSTED);
|
222
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_KEY_TYPE);
|
223
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SUBJECT);
|
224
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ID);
|
225
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SENSITIVE);
|
226
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ENCRYPT);
|
227
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_DECRYPT);
|
228
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_WRAP);
|
229
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_UNWRAP);
|
230
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SIGN);
|
231
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SIGN_RECOVER);
|
232
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_VERIFY);
|
233
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_VERIFY_RECOVER);
|
234
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_DERIVE);
|
235
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_START_DATE);
|
236
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_END_DATE);
|
237
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_MODULUS);
|
238
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_MODULUS_BITS);
|
239
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PUBLIC_EXPONENT);
|
240
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PRIVATE_EXPONENT);
|
241
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PRIME_1);
|
242
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PRIME_2);
|
243
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_EXPONENT_1);
|
244
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_EXPONENT_2);
|
245
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_COEFFICIENT);
|
246
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PRIME);
|
247
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SUBPRIME);
|
248
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_BASE);
|
249
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PRIME_BITS);
|
250
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SUBPRIME_BITS);
|
251
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SUB_PRIME_BITS);
|
252
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_VALUE_BITS);
|
253
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_VALUE_LEN);
|
254
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_EXTRACTABLE);
|
255
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_LOCAL);
|
256
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_NEVER_EXTRACTABLE);
|
257
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ALWAYS_SENSITIVE);
|
258
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_KEY_GEN_MECHANISM);
|
259
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_MODIFIABLE);
|
260
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ECDSA_PARAMS);
|
261
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_EC_PARAMS);
|
262
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_EC_POINT);
|
263
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SECONDARY_AUTH);
|
264
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_AUTH_PIN_FLAGS);
|
265
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_HW_FEATURE_TYPE);
|
266
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_RESET_ON_INIT);
|
267
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_HAS_RESET);
|
268
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_VENDOR_DEFINED);
|
269
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ALLOWED_MECHANISMS);
|
270
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ALWAYS_AUTHENTICATE);
|
271
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_BITS_PER_PIXEL);
|
272
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_CERTIFICATE_CATEGORY);
|
273
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_CHAR_COLUMNS);
|
274
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_CHAR_ROWS);
|
275
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_CHAR_SETS);
|
276
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_CHECK_VALUE);
|
277
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_COLOR);
|
278
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_DEFAULT_CMS_ATTRIBUTES);
|
279
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_ENCODING_METHODS);
|
280
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_HASH_OF_ISSUER_PUBLIC_KEY);
|
281
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_HASH_OF_SUBJECT_PUBLIC_KEY);
|
282
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_JAVA_MIDP_SECURITY_DOMAIN);
|
283
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_MECHANISM_TYPE);
|
284
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_MIME_TYPES);
|
285
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_CHALLENGE_REQUIREMENT);
|
286
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_COUNTER);
|
287
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_COUNTER_REQUIREMENT);
|
288
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_FORMAT);
|
289
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_LENGTH);
|
290
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_PIN_REQUIREMENT);
|
291
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_SERVICE_IDENTIFIER);
|
292
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_SERVICE_LOGO);
|
293
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_SERVICE_LOGO_TYPE);
|
294
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_TIME);
|
295
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_TIME_INTERVAL);
|
296
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_TIME_REQUIREMENT);
|
297
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_USER_FRIENDLY_MODE);
|
298
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_OTP_USER_IDENTIFIER);
|
299
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PIXEL_X);
|
300
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_PIXEL_Y);
|
301
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_REQUIRED_CMS_ATTRIBUTES);
|
302
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_RESOLUTION);
|
303
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_SUPPORTED_CMS_ATTRIBUTES);
|
304
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_UNWRAP_TEMPLATE);
|
305
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_URL);
|
306
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_WRAP_TEMPLATE);
|
307
|
+
PKCS11_DEFINE_ATTRIBUTE(CKA_WRAP_WITH_TRUSTED);
|
308
|
+
rb_obj_freeze(vATTRIBUTES);
|
309
|
+
rb_define_const(cPKCS11, "ATTRIBUTES", vATTRIBUTES);
|
310
|
+
|
311
|
+
vMECHANISMS = rb_hash_new();
|
312
|
+
PKCS11_DEFINE_MECHANISM(CKM_RSA_PKCS_KEY_PAIR_GEN);
|
313
|
+
PKCS11_DEFINE_MECHANISM(CKM_RSA_PKCS);
|
314
|
+
PKCS11_DEFINE_MECHANISM(CKM_RSA_9796);
|
315
|
+
PKCS11_DEFINE_MECHANISM(CKM_RSA_X_509);
|
316
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD2_RSA_PKCS);
|
317
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD5_RSA_PKCS);
|
318
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA1_RSA_PKCS);
|
319
|
+
PKCS11_DEFINE_MECHANISM(CKM_RIPEMD128_RSA_PKCS);
|
320
|
+
PKCS11_DEFINE_MECHANISM(CKM_RIPEMD160_RSA_PKCS);
|
321
|
+
PKCS11_DEFINE_MECHANISM(CKM_RSA_PKCS_OAEP);
|
322
|
+
PKCS11_DEFINE_MECHANISM(CKM_RSA_X9_31_KEY_PAIR_GEN);
|
323
|
+
PKCS11_DEFINE_MECHANISM(CKM_RSA_X9_31);
|
324
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA1_RSA_X9_31);
|
325
|
+
PKCS11_DEFINE_MECHANISM(CKM_RSA_PKCS_PSS);
|
326
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA1_RSA_PKCS_PSS);
|
327
|
+
PKCS11_DEFINE_MECHANISM(CKM_DSA_KEY_PAIR_GEN);
|
328
|
+
PKCS11_DEFINE_MECHANISM(CKM_DSA);
|
329
|
+
PKCS11_DEFINE_MECHANISM(CKM_DSA_SHA1);
|
330
|
+
PKCS11_DEFINE_MECHANISM(CKM_DH_PKCS_KEY_PAIR_GEN);
|
331
|
+
PKCS11_DEFINE_MECHANISM(CKM_DH_PKCS_DERIVE);
|
332
|
+
PKCS11_DEFINE_MECHANISM(CKM_X9_42_DH_KEY_PAIR_GEN);
|
333
|
+
PKCS11_DEFINE_MECHANISM(CKM_X9_42_DH_DERIVE);
|
334
|
+
PKCS11_DEFINE_MECHANISM(CKM_X9_42_DH_HYBRID_DERIVE);
|
335
|
+
PKCS11_DEFINE_MECHANISM(CKM_X9_42_MQV_DERIVE);
|
336
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC2_KEY_GEN);
|
337
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC2_ECB);
|
338
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC2_CBC);
|
339
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC2_MAC);
|
340
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC2_MAC_GENERAL);
|
341
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC2_CBC_PAD);
|
342
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC4_KEY_GEN);
|
343
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC4);
|
344
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_KEY_GEN);
|
345
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_ECB);
|
346
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_CBC);
|
347
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_MAC);
|
348
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_MAC_GENERAL);
|
349
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_CBC_PAD);
|
350
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES2_KEY_GEN);
|
351
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES3_KEY_GEN);
|
352
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES3_ECB);
|
353
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES3_CBC);
|
354
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES3_MAC);
|
355
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES3_MAC_GENERAL);
|
356
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES3_CBC_PAD);
|
357
|
+
PKCS11_DEFINE_MECHANISM(CKM_CDMF_KEY_GEN);
|
358
|
+
PKCS11_DEFINE_MECHANISM(CKM_CDMF_ECB);
|
359
|
+
PKCS11_DEFINE_MECHANISM(CKM_CDMF_CBC);
|
360
|
+
PKCS11_DEFINE_MECHANISM(CKM_CDMF_MAC);
|
361
|
+
PKCS11_DEFINE_MECHANISM(CKM_CDMF_MAC_GENERAL);
|
362
|
+
PKCS11_DEFINE_MECHANISM(CKM_CDMF_CBC_PAD);
|
363
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD2);
|
364
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD2_HMAC);
|
365
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD2_HMAC_GENERAL);
|
366
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD5);
|
367
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD5_HMAC);
|
368
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD5_HMAC_GENERAL);
|
369
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA_1);
|
370
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA_1_HMAC);
|
371
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA_1_HMAC_GENERAL);
|
372
|
+
PKCS11_DEFINE_MECHANISM(CKM_RIPEMD128);
|
373
|
+
PKCS11_DEFINE_MECHANISM(CKM_RIPEMD128_HMAC);
|
374
|
+
PKCS11_DEFINE_MECHANISM(CKM_RIPEMD128_HMAC_GENERAL);
|
375
|
+
PKCS11_DEFINE_MECHANISM(CKM_RIPEMD160);
|
376
|
+
PKCS11_DEFINE_MECHANISM(CKM_RIPEMD160_HMAC);
|
377
|
+
PKCS11_DEFINE_MECHANISM(CKM_RIPEMD160_HMAC_GENERAL);
|
378
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST_KEY_GEN);
|
379
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST_ECB);
|
380
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST_CBC);
|
381
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST_MAC);
|
382
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST_MAC_GENERAL);
|
383
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST_CBC_PAD);
|
384
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST3_KEY_GEN);
|
385
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST3_ECB);
|
386
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST3_CBC);
|
387
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST3_MAC);
|
388
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST3_MAC_GENERAL);
|
389
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST3_CBC_PAD);
|
390
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST5_KEY_GEN);
|
391
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST128_KEY_GEN);
|
392
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST5_ECB);
|
393
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST128_ECB);
|
394
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST5_CBC);
|
395
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST128_CBC);
|
396
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST5_MAC);
|
397
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST128_MAC);
|
398
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST5_MAC_GENERAL);
|
399
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST128_MAC_GENERAL);
|
400
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST5_CBC_PAD);
|
401
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAST128_CBC_PAD);
|
402
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC5_KEY_GEN);
|
403
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC5_ECB);
|
404
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC5_CBC);
|
405
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC5_MAC);
|
406
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC5_MAC_GENERAL);
|
407
|
+
PKCS11_DEFINE_MECHANISM(CKM_RC5_CBC_PAD);
|
408
|
+
PKCS11_DEFINE_MECHANISM(CKM_IDEA_KEY_GEN);
|
409
|
+
PKCS11_DEFINE_MECHANISM(CKM_IDEA_ECB);
|
410
|
+
PKCS11_DEFINE_MECHANISM(CKM_IDEA_CBC);
|
411
|
+
PKCS11_DEFINE_MECHANISM(CKM_IDEA_MAC);
|
412
|
+
PKCS11_DEFINE_MECHANISM(CKM_IDEA_MAC_GENERAL);
|
413
|
+
PKCS11_DEFINE_MECHANISM(CKM_IDEA_CBC_PAD);
|
414
|
+
PKCS11_DEFINE_MECHANISM(CKM_GENERIC_SECRET_KEY_GEN);
|
415
|
+
PKCS11_DEFINE_MECHANISM(CKM_CONCATENATE_BASE_AND_KEY);
|
416
|
+
PKCS11_DEFINE_MECHANISM(CKM_CONCATENATE_BASE_AND_DATA);
|
417
|
+
PKCS11_DEFINE_MECHANISM(CKM_CONCATENATE_DATA_AND_BASE);
|
418
|
+
PKCS11_DEFINE_MECHANISM(CKM_XOR_BASE_AND_DATA);
|
419
|
+
PKCS11_DEFINE_MECHANISM(CKM_EXTRACT_KEY_FROM_KEY);
|
420
|
+
PKCS11_DEFINE_MECHANISM(CKM_SSL3_PRE_MASTER_KEY_GEN);
|
421
|
+
PKCS11_DEFINE_MECHANISM(CKM_SSL3_MASTER_KEY_DERIVE);
|
422
|
+
PKCS11_DEFINE_MECHANISM(CKM_SSL3_KEY_AND_MAC_DERIVE);
|
423
|
+
PKCS11_DEFINE_MECHANISM(CKM_SSL3_MASTER_KEY_DERIVE_DH);
|
424
|
+
PKCS11_DEFINE_MECHANISM(CKM_TLS_PRE_MASTER_KEY_GEN);
|
425
|
+
PKCS11_DEFINE_MECHANISM(CKM_TLS_MASTER_KEY_DERIVE);
|
426
|
+
PKCS11_DEFINE_MECHANISM(CKM_TLS_KEY_AND_MAC_DERIVE);
|
427
|
+
PKCS11_DEFINE_MECHANISM(CKM_TLS_MASTER_KEY_DERIVE_DH);
|
428
|
+
PKCS11_DEFINE_MECHANISM(CKM_SSL3_MD5_MAC);
|
429
|
+
PKCS11_DEFINE_MECHANISM(CKM_SSL3_SHA1_MAC);
|
430
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD5_KEY_DERIVATION);
|
431
|
+
PKCS11_DEFINE_MECHANISM(CKM_MD2_KEY_DERIVATION);
|
432
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA1_KEY_DERIVATION);
|
433
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_MD2_DES_CBC);
|
434
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_MD5_DES_CBC);
|
435
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_MD5_CAST_CBC);
|
436
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_MD5_CAST3_CBC);
|
437
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_MD5_CAST5_CBC);
|
438
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_MD5_CAST128_CBC);
|
439
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_SHA1_CAST5_CBC);
|
440
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_SHA1_CAST128_CBC);
|
441
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_SHA1_RC4_128);
|
442
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_SHA1_RC4_40);
|
443
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_SHA1_DES3_EDE_CBC);
|
444
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_SHA1_DES2_EDE_CBC);
|
445
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_SHA1_RC2_128_CBC);
|
446
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBE_SHA1_RC2_40_CBC);
|
447
|
+
PKCS11_DEFINE_MECHANISM(CKM_PKCS5_PBKD2);
|
448
|
+
PKCS11_DEFINE_MECHANISM(CKM_PBA_SHA1_WITH_SHA1_HMAC);
|
449
|
+
PKCS11_DEFINE_MECHANISM(CKM_KEY_WRAP_LYNKS);
|
450
|
+
PKCS11_DEFINE_MECHANISM(CKM_KEY_WRAP_SET_OAEP);
|
451
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_KEY_GEN);
|
452
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_ECB64);
|
453
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_CBC64);
|
454
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_OFB64);
|
455
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_CFB64);
|
456
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_CFB32);
|
457
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_CFB16);
|
458
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_CFB8);
|
459
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_WRAP);
|
460
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_PRIVATE_WRAP);
|
461
|
+
PKCS11_DEFINE_MECHANISM(CKM_SKIPJACK_RELAYX);
|
462
|
+
PKCS11_DEFINE_MECHANISM(CKM_KEA_KEY_PAIR_GEN);
|
463
|
+
PKCS11_DEFINE_MECHANISM(CKM_KEA_KEY_DERIVE);
|
464
|
+
PKCS11_DEFINE_MECHANISM(CKM_FORTEZZA_TIMESTAMP);
|
465
|
+
PKCS11_DEFINE_MECHANISM(CKM_BATON_KEY_GEN);
|
466
|
+
PKCS11_DEFINE_MECHANISM(CKM_BATON_ECB128);
|
467
|
+
PKCS11_DEFINE_MECHANISM(CKM_BATON_ECB96);
|
468
|
+
PKCS11_DEFINE_MECHANISM(CKM_BATON_CBC128);
|
469
|
+
PKCS11_DEFINE_MECHANISM(CKM_BATON_COUNTER);
|
470
|
+
PKCS11_DEFINE_MECHANISM(CKM_BATON_SHUFFLE);
|
471
|
+
PKCS11_DEFINE_MECHANISM(CKM_BATON_WRAP);
|
472
|
+
PKCS11_DEFINE_MECHANISM(CKM_ECDSA_KEY_PAIR_GEN);
|
473
|
+
PKCS11_DEFINE_MECHANISM(CKM_EC_KEY_PAIR_GEN);
|
474
|
+
PKCS11_DEFINE_MECHANISM(CKM_ECDSA);
|
475
|
+
PKCS11_DEFINE_MECHANISM(CKM_ECDSA_SHA1);
|
476
|
+
PKCS11_DEFINE_MECHANISM(CKM_ECDH1_DERIVE);
|
477
|
+
PKCS11_DEFINE_MECHANISM(CKM_ECDH1_COFACTOR_DERIVE);
|
478
|
+
PKCS11_DEFINE_MECHANISM(CKM_ECMQV_DERIVE);
|
479
|
+
PKCS11_DEFINE_MECHANISM(CKM_JUNIPER_KEY_GEN);
|
480
|
+
PKCS11_DEFINE_MECHANISM(CKM_JUNIPER_ECB128);
|
481
|
+
PKCS11_DEFINE_MECHANISM(CKM_JUNIPER_CBC128);
|
482
|
+
PKCS11_DEFINE_MECHANISM(CKM_JUNIPER_COUNTER);
|
483
|
+
PKCS11_DEFINE_MECHANISM(CKM_JUNIPER_SHUFFLE);
|
484
|
+
PKCS11_DEFINE_MECHANISM(CKM_JUNIPER_WRAP);
|
485
|
+
PKCS11_DEFINE_MECHANISM(CKM_FASTHASH);
|
486
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_KEY_GEN);
|
487
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_ECB);
|
488
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_CBC);
|
489
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_MAC);
|
490
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_MAC_GENERAL);
|
491
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_CBC_PAD);
|
492
|
+
PKCS11_DEFINE_MECHANISM(CKM_DSA_PARAMETER_GEN);
|
493
|
+
PKCS11_DEFINE_MECHANISM(CKM_DH_PKCS_PARAMETER_GEN);
|
494
|
+
PKCS11_DEFINE_MECHANISM(CKM_X9_42_DH_PARAMETER_GEN);
|
495
|
+
PKCS11_DEFINE_MECHANISM(CKM_ACTI);
|
496
|
+
PKCS11_DEFINE_MECHANISM(CKM_ACTI_KEY_GEN);
|
497
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_CBC_ENCRYPT_DATA);
|
498
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_CTR);
|
499
|
+
PKCS11_DEFINE_MECHANISM(CKM_AES_ECB_ENCRYPT_DATA);
|
500
|
+
PKCS11_DEFINE_MECHANISM(CKM_ARIA_CBC);
|
501
|
+
PKCS11_DEFINE_MECHANISM(CKM_ARIA_CBC_ENCRYPT_DATA);
|
502
|
+
PKCS11_DEFINE_MECHANISM(CKM_ARIA_CBC_PAD);
|
503
|
+
PKCS11_DEFINE_MECHANISM(CKM_ARIA_ECB);
|
504
|
+
PKCS11_DEFINE_MECHANISM(CKM_ARIA_ECB_ENCRYPT_DATA);
|
505
|
+
PKCS11_DEFINE_MECHANISM(CKM_ARIA_KEY_GEN);
|
506
|
+
PKCS11_DEFINE_MECHANISM(CKM_ARIA_MAC);
|
507
|
+
PKCS11_DEFINE_MECHANISM(CKM_ARIA_MAC_GENERAL);
|
508
|
+
PKCS11_DEFINE_MECHANISM(CKM_BLOWFISH_CBC);
|
509
|
+
PKCS11_DEFINE_MECHANISM(CKM_BLOWFISH_KEY_GEN);
|
510
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_CBC);
|
511
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_CBC_ENCRYPT_DATA);
|
512
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_CBC_PAD);
|
513
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_CTR);
|
514
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_ECB);
|
515
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_ECB_ENCRYPT_DATA);
|
516
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_KEY_GEN);
|
517
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_MAC);
|
518
|
+
PKCS11_DEFINE_MECHANISM(CKM_CAMELLIA_MAC_GENERAL);
|
519
|
+
PKCS11_DEFINE_MECHANISM(CKM_CMS_SIG);
|
520
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES3_CBC_ENCRYPT_DATA);
|
521
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES3_ECB_ENCRYPT_DATA);
|
522
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_CBC_ENCRYPT_DATA);
|
523
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_CFB64);
|
524
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_CFB8);
|
525
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_ECB_ENCRYPT_DATA);
|
526
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_OFB64);
|
527
|
+
PKCS11_DEFINE_MECHANISM(CKM_DES_OFB8);
|
528
|
+
PKCS11_DEFINE_MECHANISM(CKM_HOTP);
|
529
|
+
PKCS11_DEFINE_MECHANISM(CKM_HOTP_KEY_GEN);
|
530
|
+
PKCS11_DEFINE_MECHANISM(CKM_KIP_DERIVE);
|
531
|
+
PKCS11_DEFINE_MECHANISM(CKM_KIP_MAC);
|
532
|
+
PKCS11_DEFINE_MECHANISM(CKM_KIP_WRAP);
|
533
|
+
PKCS11_DEFINE_MECHANISM(CKM_SECURID);
|
534
|
+
PKCS11_DEFINE_MECHANISM(CKM_SECURID_KEY_GEN);
|
535
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA224);
|
536
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA224_HMAC);
|
537
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA224_HMAC_GENERAL);
|
538
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA224_KEY_DERIVATION);
|
539
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA224_RSA_PKCS);
|
540
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA224_RSA_PKCS_PSS);
|
541
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA256);
|
542
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA256_HMAC);
|
543
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA256_HMAC_GENERAL);
|
544
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA256_KEY_DERIVATION);
|
545
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA256_RSA_PKCS);
|
546
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA256_RSA_PKCS_PSS);
|
547
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA384);
|
548
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA384_HMAC);
|
549
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA384_HMAC_GENERAL);
|
550
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA384_KEY_DERIVATION);
|
551
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA384_RSA_PKCS);
|
552
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA384_RSA_PKCS_PSS);
|
553
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA512);
|
554
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA512_HMAC);
|
555
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA512_HMAC_GENERAL);
|
556
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA512_KEY_DERIVATION);
|
557
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA512_RSA_PKCS);
|
558
|
+
PKCS11_DEFINE_MECHANISM(CKM_SHA512_RSA_PKCS_PSS);
|
559
|
+
PKCS11_DEFINE_MECHANISM(CKM_TLS_PRF);
|
560
|
+
PKCS11_DEFINE_MECHANISM(CKM_TWOFISH_CBC);
|
561
|
+
PKCS11_DEFINE_MECHANISM(CKM_TWOFISH_KEY_GEN);
|
562
|
+
PKCS11_DEFINE_MECHANISM(CKM_WTLS_CLIENT_KEY_AND_MAC_DERIVE);
|
563
|
+
PKCS11_DEFINE_MECHANISM(CKM_WTLS_MASTER_KEY_DERIVE);
|
564
|
+
PKCS11_DEFINE_MECHANISM(CKM_WTLS_MASTER_KEY_DERIVE_DH_ECC);
|
565
|
+
PKCS11_DEFINE_MECHANISM(CKM_WTLS_PRE_MASTER_KEY_GEN);
|
566
|
+
PKCS11_DEFINE_MECHANISM(CKM_WTLS_PRF);
|
567
|
+
PKCS11_DEFINE_MECHANISM(CKM_WTLS_SERVER_KEY_AND_MAC_DERIVE);
|
568
|
+
PKCS11_DEFINE_MECHANISM(CKM_VENDOR_DEFINED);
|
569
|
+
rb_obj_freeze(vMECHANISMS);
|
570
|
+
rb_define_const(cPKCS11, "MECHANISMS", vMECHANISMS);
|
571
|
+
|
572
|
+
vRETURN_VALUES = rb_hash_new();
|
573
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_OK);
|
574
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_CANCEL);
|
575
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_HOST_MEMORY);
|
576
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SLOT_ID_INVALID);
|
577
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_GENERAL_ERROR);
|
578
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_FUNCTION_FAILED);
|
579
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_ARGUMENTS_BAD);
|
580
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_NO_EVENT);
|
581
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_NEED_TO_CREATE_THREADS);
|
582
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_CANT_LOCK);
|
583
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_ATTRIBUTE_READ_ONLY);
|
584
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_ATTRIBUTE_SENSITIVE);
|
585
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_ATTRIBUTE_TYPE_INVALID);
|
586
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_ATTRIBUTE_VALUE_INVALID);
|
587
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_DATA_INVALID);
|
588
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_DATA_LEN_RANGE);
|
589
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_DEVICE_ERROR);
|
590
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_DEVICE_MEMORY);
|
591
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_DEVICE_REMOVED);
|
592
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_ENCRYPTED_DATA_INVALID);
|
593
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_ENCRYPTED_DATA_LEN_RANGE);
|
594
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_FUNCTION_CANCELED);
|
595
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_FUNCTION_NOT_PARALLEL);
|
596
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_FUNCTION_NOT_SUPPORTED);
|
597
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_HANDLE_INVALID);
|
598
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_SIZE_RANGE);
|
599
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_TYPE_INCONSISTENT);
|
600
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_NOT_NEEDED);
|
601
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_CHANGED);
|
602
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_NEEDED);
|
603
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_INDIGESTIBLE);
|
604
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_FUNCTION_NOT_PERMITTED);
|
605
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_NOT_WRAPPABLE);
|
606
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_KEY_UNEXTRACTABLE);
|
607
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_MECHANISM_INVALID);
|
608
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_MECHANISM_PARAM_INVALID);
|
609
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_OBJECT_HANDLE_INVALID);
|
610
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_OPERATION_ACTIVE);
|
611
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_OPERATION_NOT_INITIALIZED);
|
612
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_PIN_INCORRECT);
|
613
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_PIN_INVALID);
|
614
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_PIN_LEN_RANGE);
|
615
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_PIN_EXPIRED);
|
616
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_PIN_LOCKED);
|
617
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SESSION_CLOSED);
|
618
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SESSION_COUNT);
|
619
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SESSION_HANDLE_INVALID);
|
620
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SESSION_PARALLEL_NOT_SUPPORTED);
|
621
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SESSION_READ_ONLY);
|
622
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SESSION_EXISTS);
|
623
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SESSION_READ_ONLY_EXISTS);
|
624
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SESSION_READ_WRITE_SO_EXISTS);
|
625
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SIGNATURE_INVALID);
|
626
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SIGNATURE_LEN_RANGE);
|
627
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_TEMPLATE_INCOMPLETE);
|
628
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_TEMPLATE_INCONSISTENT);
|
629
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_TOKEN_NOT_PRESENT);
|
630
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_TOKEN_NOT_RECOGNIZED);
|
631
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_TOKEN_WRITE_PROTECTED);
|
632
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_UNWRAPPING_KEY_HANDLE_INVALID);
|
633
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_UNWRAPPING_KEY_SIZE_RANGE);
|
634
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT);
|
635
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_USER_ALREADY_LOGGED_IN);
|
636
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_USER_NOT_LOGGED_IN);
|
637
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_USER_PIN_NOT_INITIALIZED);
|
638
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_USER_TYPE_INVALID);
|
639
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_USER_ANOTHER_ALREADY_LOGGED_IN);
|
640
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_USER_TOO_MANY_TYPES);
|
641
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_WRAPPED_KEY_INVALID);
|
642
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_WRAPPED_KEY_LEN_RANGE);
|
643
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_WRAPPING_KEY_HANDLE_INVALID);
|
644
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_WRAPPING_KEY_SIZE_RANGE);
|
645
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_WRAPPING_KEY_TYPE_INCONSISTENT);
|
646
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_RANDOM_SEED_NOT_SUPPORTED);
|
647
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_RANDOM_NO_RNG);
|
648
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_DOMAIN_PARAMS_INVALID);
|
649
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_BUFFER_TOO_SMALL);
|
650
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_SAVED_STATE_INVALID);
|
651
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_INFORMATION_SENSITIVE);
|
652
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_STATE_UNSAVEABLE);
|
653
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_CRYPTOKI_NOT_INITIALIZED);
|
654
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_CRYPTOKI_ALREADY_INITIALIZED);
|
655
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_MUTEX_BAD);
|
656
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_MUTEX_NOT_LOCKED);
|
657
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_FUNCTION_REJECTED);
|
658
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_NEW_PIN_MODE);
|
659
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_NEXT_OTP);
|
660
|
+
PKCS11_DEFINE_RETURN_VALUE(CKR_VENDOR_DEFINED);
|
661
|
+
rb_obj_freeze(vRETURN_VALUES);
|
662
|
+
rb_define_const(cPKCS11, "RETURN_VALUES", vRETURN_VALUES);
|
663
|
+
|
664
|
+
/* OTP parameters */
|
665
|
+
PKCS11_DEFINE_CONST(CK_OTP_CHALLENGE);
|
666
|
+
PKCS11_DEFINE_CONST(CK_OTP_COUNTER);
|
667
|
+
PKCS11_DEFINE_CONST(CK_OTP_FLAGS);
|
668
|
+
PKCS11_DEFINE_CONST(CK_OTP_FORMAT_ALPHANUMERIC);
|
669
|
+
PKCS11_DEFINE_CONST(CK_OTP_FORMAT_BINARY);
|
670
|
+
PKCS11_DEFINE_CONST(CK_OTP_FORMAT_DECIMAL);
|
671
|
+
PKCS11_DEFINE_CONST(CK_OTP_FORMAT_HEXADECIMAL);
|
672
|
+
PKCS11_DEFINE_CONST(CK_OTP_OUTPUT_FORMAT);
|
673
|
+
PKCS11_DEFINE_CONST(CK_OTP_OUTPUT_LENGTH);
|
674
|
+
PKCS11_DEFINE_CONST(CK_OTP_PARAM_IGNORED);
|
675
|
+
PKCS11_DEFINE_CONST(CK_OTP_PARAM_MANDATORY);
|
676
|
+
PKCS11_DEFINE_CONST(CK_OTP_PARAM_OPTIONAL);
|
677
|
+
PKCS11_DEFINE_CONST(CK_OTP_PIN);
|
678
|
+
PKCS11_DEFINE_CONST(CK_OTP_TIME);
|
679
|
+
PKCS11_DEFINE_CONST(CK_OTP_VALUE);
|
680
|
+
}
|