p11_kit_initialize_registered in a constructor

Stef Walter stef at thewalter.net
Mon Dec 9 03:18:17 PST 2013


On 09.12.2013 11:01, Nikos Mavrogiannopoulos wrote:
> On Wed, 2013-12-04 at 08:34 +0100, Nikos Mavrogiannopoulos wrote:
>>> On the other hand, the behavior of C_Initialize for various PKCS#11
>>> modules is far from well-behaved. Some of them take many tens of seconds
>>> to complete.
>>>
>>> I would suggest using the new p11-kit API, and loading the modules, but
>>> not initializing them until use.
>>
>> I guess you mean splitting p11_kit_modules_load_and_initialize() to
>> p11_kit_modules_load() and p11_kit_modules_initialize() (btw. these
>> functions are not in the API index of the web-site manual). 
> 
> Another question on that. Is there any particular advantage in loading
> them at a constructor and initializing later, rather than simply loading
> and initializing when needed?

Nope, the latter sounds fine to me. I think loading them as late as
possible makes sense.

Cheers,

Stef


-- 

stef at thewalter.net
http://stef.thewalter.net


More information about the p11-glue mailing list