Skip to content
Snippets Groups Projects
Commit 2c596749 authored by Fredrik Thulin's avatar Fredrik Thulin
Browse files

Ask p11 module to use OS locking.

Since p11proxy is a threaded application, the underlying p11
module should do locking (the proxy does no locking).
parent d3acc2f4
No related branches found
No related tags found
No related merge requests found
...@@ -170,6 +170,7 @@ int main(int argc, char *argv[]) ...@@ -170,6 +170,7 @@ int main(int argc, char *argv[])
fd_set read_fds; fd_set read_fds;
int sock, ret; int sock, ret;
CK_RV rv; CK_RV rv;
CK_C_INITIALIZE_ARGS init_args;
if (install_syscall_reporter()) if (install_syscall_reporter())
...@@ -212,7 +213,10 @@ int main(int argc, char *argv[]) ...@@ -212,7 +213,10 @@ int main(int argc, char *argv[])
} }
/* RPC layer expects initialized module */ /* RPC layer expects initialized module */
rv = (funcs->C_Initialize) (NULL /* &p11_init_args */); memset(&init_args, 0, sizeof(init_args));
init_args.flags = CKF_OS_LOCKING_OK;
rv = (funcs->C_Initialize) (&init_args);
if (rv != CKR_OK) { if (rv != CKR_OK) {
fprintf(stderr, "couldn't initialize module: %s: 0x%08x\n", fprintf(stderr, "couldn't initialize module: %s: 0x%08x\n",
argv[1], (int)rv); argv[1], (int)rv);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment