summaryrefslogtreecommitdiff
path: root/p11-kit/modules.c
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 /p11-kit/modules.c
parent5c19f0cf66495f00ccf69eba1d0915f862a88c8d (diff)
downloadp11-kit-0cb1132469c1e13be64f85cd6566e6617bfe32cc.tar.gz
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 'p11-kit/modules.c')
-rw-r--r--p11-kit/modules.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/p11-kit/modules.c b/p11-kit/modules.c
index c6f1bee..20475f2 100644
--- a/p11-kit/modules.c
+++ b/p11-kit/modules.c
@@ -49,6 +49,7 @@
#include "pkcs11.h"
#include "p11-kit.h"
#include "private.h"
+#include "proxy.h"
#include "virtual.h"
#include <sys/stat.h>
@@ -335,7 +336,7 @@ dlopen_and_get_function_list (Module *mod, const char *path)
return rv;
}
- if (mod->funcs == &_p11_proxy_function_list) {
+ if (p11_proxy_module_check (funcs)) {
p11_message ("refusing to load the p11-kit-proxy.so module as a registered module");
return CKR_FUNCTION_FAILED;
}
@@ -679,7 +680,7 @@ reinitialize_after_fork (void)
p11_unlock ();
- _p11_kit_proxy_after_fork ();
+ p11_proxy_after_fork ();
}
#endif /* OS_UNIX */