[pkg-opensc-commit] [pkcs11-helper] 04/15: Add an option to specify additional string at initargs.pReserved, so that NSS provider may work
Eric Dorland
eric at moszumanska.debian.org
Fri Jan 6 23:40:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to tag pkcs11-helper-1.08
in repository pkcs11-helper.
commit e5e095a864e09a425f7aa721656d94f246daa217
Author: alonbl <alonbl at 485eb718-1723-0410-b8a9-88cf21a28c35>
Date: Thu Jun 18 10:22:54 2009 +0000
Add an option to specify additional string at initargs.pReserved, so that NSS provider may work
---
lib/pkcs11h-core.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/pkcs11h-core.c b/lib/pkcs11h-core.c
index eb9e58b..e54a636 100644
--- a/lib/pkcs11h-core.c
+++ b/lib/pkcs11h-core.c
@@ -646,6 +646,8 @@ pkcs11h_addProvider (
_pkcs11h_provider_t provider = NULL;
CK_C_GetFunctionList gfl = NULL;
+ CK_C_INITIALIZE_ARGS initargs;
+ CK_C_INITIALIZE_ARGS_PTR pinitargs = NULL;
CK_INFO info;
CK_RV rv = CKR_FUNCTION_FAILED;
@@ -745,7 +747,12 @@ pkcs11h_addProvider (
goto cleanup;
}
- if ((rv = provider->f->C_Initialize (NULL)) != CKR_OK) {
+ memset(&initargs, 0, sizeof(initargs));
+ if ((initargs.pReserved = getenv("PKCS11H_INIT_ARGS_RESERVED")) != NULL) {
+ pinitargs = &initargs;
+ }
+
+ if ((rv = provider->f->C_Initialize (pinitargs)) != CKR_OK) {
if (rv == CKR_CRYPTOKI_ALREADY_INITIALIZED) {
rv = CKR_OK;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/pkcs11-helper.git
More information about the pkg-opensc-commit
mailing list