diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-03-31 18:21:38 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-03-31 18:21:38 +0200 |
commit | cf988aa7858d249887ea0818301c7211bb3cab38 (patch) | |
tree | eee37da8c5ed80ca0b6546dfd7c3580f28bf6f66 /p11-kit | |
parent | 540a00501ba682b420b143480d5864335cad6c71 (diff) |
Support setting of CK_C_INITIALIZE_ARGS.pReserved to string.
This is a naughty little thing that a lot of PKCS#11 modules require
to be properly initialized. So we support setting pReserved to a string
that is in the config under the 'x-init-reserved' parameter.
Diffstat (limited to 'p11-kit')
-rw-r--r-- | p11-kit/p11-kit-lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/p11-kit/p11-kit-lib.c b/p11-kit/p11-kit-lib.c index f57f3d1..e7e913a 100644 --- a/p11-kit/p11-kit-lib.c +++ b/p11-kit/p11-kit-lib.c @@ -367,6 +367,13 @@ load_module_from_config_unlocked (const char *configfile, const char *name) return CKR_GENERAL_ERROR; } + /* + * We support setting of CK_C_INITIALIZE_ARGS.pReserved from + * 'x-init-reserved' setting in the config. This only works with specific + * PKCS#11 modules, and is non-standard use of that field. + */ + module->init_args.pReserved = hash_get (module->config, "x-init-reserved"); + return CKR_OK; } |