[Opendnssec-user] C_CloseAllSessions and threads

Fredrik Thulin fredrik at thulin.net
Fri Jan 18 15:58:47 UTC 2013


On Fri, 2013-01-18 at 13:03 +0100, Casper Gielen wrote:
...
> I've encountered this problem before. I have been told that this is more
> or less a fundamentel problem with PKCS11. To fix it some kind of
> front-end should be created that keeps track of the sessions and
> intercepts calls to C_CloseAllSessions.

Thanks. That's how I had worked around it in pkcs11-proxy - committed
now.

https://github.com/fredrikt/pkcs11-proxy/commit/bcb78df5ab17456e68f782e165346dcdc2554a6e

I think it would be better if SoftHSM signaled this condition through
CKR_SESSION_CLOSED rather than SIGSEGV though.

Reference counting instead of 'delete' perhaps? (Remember, I'm not a C++
programmer).

/Fredrik





More information about the Opendnssec-user mailing list