Replies: 2 comments 8 replies
-
|
We definitely welcome the possibility of loading multiple modules, it hasn't been done so far only because it wasn't needed by our immediate needs, but it is something we've been wanting to look into. You can easily add an array of P11PROV_MODULE structures in p11prov_ctx, but if different configurations or different quirks are needed that becomes a little more complicated. Searching for keys can also lead to issues if there is no pkcs11-uri or the provided pkcs11-uri does not contain identifiers needed to selects a single token. Another option we have been contemplated has been to make it possible to load multiple pkcs11-provider instances (one per pkcs11 token) so that they can work in parallel, that could potentially require some small changes in openssl, however using entirely different configurations would be much simpler to manage that way and would require a lot less changes to the code structure. |
Beta Was this translation helpful? Give feedback.
-
|
Would using of p11-kit-proxy solve your issue for you? It loads any amount of pkcs11 modules and presents them as one for the application, in this case pkcs11-provider. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
I'm thinking forking (possibly contribute to this repo too if it's welcome) pkcs11-provider to implement a version that supports to have multiple modules for pkcs11-provider. In other words, I'm trying to make it work when both SoftHSM and softokn are active and connected to pkcs11-provider, so that user can choose which module to use in pkcs11-uri
Now after days of investigation, it seems to me that inside pkcs11-provider it is almost always assumed that within one P11PROV_CTX there's only one
module, so one way to implement it is simply to break this assumption, create a list of modules, only load function lists when uri has been given, and fix every place where it assumes there's just one module.I was wondering if this is too much of a change, so an alternative seems to be: have a list of P11PROV_CTX instead, and make this list type the new "provider context" (i.e. OpenSSL core will treat this new list type as provider context and give it to provider). In the meantime for EVP_ and other objects, still have original P11PROV_CTX references when needed.
Could you please let me know of your opinions to the implementation? Does any of those sound good? Thank you so much for your time and information in advance!!
Best,
Ayke
Beta Was this translation helpful? Give feedback.
All reactions