diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-10-06 14:51:37 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-11-02 10:15:32 +0100 |
commit | 6ce7ae24a4b9d95c88870245a5b6cfac2155a085 (patch) | |
tree | 31fb9d5371feefe476d9572b4f4258ce0a339d2c /src/libpttls | |
parent | bf23ca09cbdb3e53f2f0cf786d325dffe605bd57 (diff) | |
download | strongswan-6ce7ae24a4b9d95c88870245a5b6cfac2155a085.tar.bz2 strongswan-6ce7ae24a4b9d95c88870245a5b6cfac2155a085.tar.xz |
pkcs11: Call C_Finalize() to cancel jobs waiting in C_WaitForSlotEvent()
This is not ideal as the call to C_Finalize() should be the last one via
the PKCS#11 API. Since the order in which jobs are canceled is undefined
we can't be sure there is no other thread still using the library (it could
even be the canceled job that still handles a previous slot event).
According to PKCS#11 the behavior of C_Finalize() is undefined while other
threads still make calls over the API.
However, canceling the thread, as done previously, could also be problematic
as PKCS#11 libraries could hold locks while in the C_WaitForSlotEvent() call,
which might not get released properly when the thread is just canceled,
and which then might cause later calls to other API functions to block.
Fixes #2437.
Diffstat (limited to 'src/libpttls')
0 files changed, 0 insertions, 0 deletions