summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-02-15 21:34:20 +0100
committerStef Walter <stefw@gnome.org>2013-05-21 10:47:53 +0200
commit0cb1132469c1e13be64f85cd6566e6617bfe32cc (patch)
tree9dec0619641038222cf14513d10ab57b88fbda64 /common
parent5c19f0cf66495f00ccf69eba1d0915f862a88c8d (diff)
Update the proxy module to use managed PKCS#11 modules
Each time C_GetFunctionList is called on the proxy module, a new managed PKCS#11 set of functions is returned. These are all cleaned up when the module is unloaded. We want the proxy module to continue to work even without the highly recommended libffi. For that reason we still keep the old behavior of sharing state in the proxy module.
Diffstat (limited to 'common')
-rw-r--r--common/mock.c9
-rw-r--r--common/mock.h11
2 files changed, 11 insertions, 9 deletions
diff --git a/common/mock.c b/common/mock.c
index 4dbd674..1a6657c 100644
--- a/common/mock.c
+++ b/common/mock.c
@@ -474,15 +474,6 @@ mock_X_Finalize (CK_X_FUNCTION_LIST *self,
return mock_C_Finalize (reserved);
}
-static const CK_INFO MOCK_INFO = {
- { CRYPTOKI_VERSION_MAJOR, CRYPTOKI_VERSION_MINOR },
- "MOCK MANUFACTURER ",
- 0,
- "MOCK LIBRARY ",
- { 45, 145 }
-};
-
-
CK_RV
mock_C_GetInfo (CK_INFO_PTR info)
{
diff --git a/common/mock.h b/common/mock.h
index 5691fe0..9128a63 100644
--- a/common/mock.h
+++ b/common/mock.h
@@ -87,6 +87,17 @@ enum {
MOCK_SLOT_ONE_ID = 52,
MOCK_SLOT_TWO_ID = 134,
+
+ MOCK_SLOTS_PRESENT = 1,
+ MOCK_SLOTS_ALL = 2,
+};
+
+static const CK_INFO MOCK_INFO = {
+ { CRYPTOKI_VERSION_MAJOR, CRYPTOKI_VERSION_MINOR },
+ "MOCK MANUFACTURER ",
+ 0,
+ "MOCK LIBRARY ",
+ { 45, 145 }
};
extern CK_FUNCTION_LIST mock_module;