OpenSC / pkcs11-helper

Library that simplifies the interaction with PKCS#11 providers for end-user applications using a simple API and optional OpenSSL engine
Other
66 stars 43 forks source link

Can't setup C_Initialize args #36

Closed lo1ol closed 2 years ago

lo1ol commented 3 years ago

Hello,

Recently we've noticed some problems of using pkcs11-helper with multithread applications (OpenVPN). The root of the problem is impossibility to pass C_Initialize flags (namely CKF_OS_LOCKING_OK).

Passing flags using Enviroment Variable is the bad way to solve the problem. For example, TunnelBlick setups openvpn only by a configuration file and command line arguments.

What do you think about adding init arguments to the pkcs11h_addProvider function signature? Could you please suggest some alternatives?

alonbl commented 2 years ago

Please check https://github.com/alonbl/pkcs11-helper/tree/always-auth branch. There is a new PKCS11H_PROVIDER_PROPERTY_INIT_ARGS property which may be set using pkcs11h_setProviderProperty.

lo1ol commented 2 years ago

Thanks. Everything is fine)