[pkg-opensc-commit] [libp11] 209/239: Tell PKCS#11 modules that using OS locking primitives is OK

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit 0ab1b61967f10ccdfbfc250f7fe1e7cdfaf311da
Author: Mike Gerow <gerow at google.com>
Date:   Wed Aug 12 17:29:11 2015 -0700

    Tell PKCS#11 modules that using OS locking primitives is OK
    
    The spec seems to indicate that not setting this flag means the module isn't
    allowed to use OS locking primitives. It seems that most modules ignore this
    anyway (Opencryptoki certainly does), but we might as well be passing the proper
    value.
---
 src/p11_load.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/p11_load.c b/src/p11_load.c
index aa6ba2b..d94dc03 100644
--- a/src/p11_load.c
+++ b/src/p11_load.c
@@ -83,6 +83,8 @@ int PKCS11_CTX_load(PKCS11_CTX * ctx, const char *name)
 	if (priv->init_args != NULL) {
 		memset(&_args, 0, sizeof(_args));
 		args = &_args;
+		/* Unconditionally say using OS locking primitives is OK */
+		args->flags |= CKF_OS_LOCKING_OK;
 		args->pReserved = priv->init_args;
 	}
 	rv = priv->method->C_Initialize(args);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list