blob: 93b19e2b4e35418b10ebb0d37718f508652a1458 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
Description: Build against libopencryptoki 2.2.28
Author: Francis Russell <francis@unchartedbackwaters.co.uk>
--- a/Common/SecurityToken.cpp 2009-11-08 01:24:41.000000000 +0000
+++ b/Common/SecurityToken.cpp 2009-11-08 01:29:30.000000000 +0000
@@ -657,9 +657,15 @@
TC_TOKEN_ERR (CKR_CRYPTOKI_ALREADY_INITIALIZED)
TC_TOKEN_ERR (CKR_MUTEX_BAD)
TC_TOKEN_ERR (CKR_MUTEX_NOT_LOCKED)
+
+ /*
+ These error codes do not exist in PKCS#11 v2.11.
+ Removing them simply causes the error description strings to be returned as hex.
+
TC_TOKEN_ERR (CKR_NEW_PIN_MODE)
TC_TOKEN_ERR (CKR_NEXT_OTP)
TC_TOKEN_ERR (CKR_FUNCTION_REJECTED)
+ */
#undef TC_TOKEN_ERR
};
--- a/Common/SecurityToken.h 2009-11-08 01:24:41.000000000 +0000
+++ b/Common/SecurityToken.h 2009-11-08 01:27:01.000000000 +0000
@@ -19,6 +19,15 @@
#ifndef NULL_PTR
# define NULL_PTR 0
#endif
+
+#ifndef CK_TRUE
+# define CK_TRUE TRUE
+#endif
+
+#ifndef CK_FALSE
+# define CK_FALSE FALSE
+#endif
+
#define CK_PTR *
#define CK_CALLBACK_FUNCTION(RET_TYPE, NAME) RET_TYPE (* NAME)
@@ -40,7 +49,7 @@
# define CK_DECLARE_FUNCTION(RET_TYPE, NAME) RET_TYPE NAME
# define CK_DECLARE_FUNCTION_POINTER(RET_TYPE, NAME) RET_TYPE (* NAME)
-# include <pkcs11.h>
+# include <opencryptoki/pkcs11.h>
#endif // !TC_WINDOWS
|