OpenSC / libp11

PKCS#11 wrapper library
GNU Lesser General Public License v2.1
314 stars 188 forks source link

Check validity of session in pkcs11_get_session #482

Closed kcking closed 1 year ago

kcking commented 1 year ago

Before this change, if a session handle became invalid it would still be returned to the caller.

This commit uses C_GetSessionInfo to check that a handle is still valid before returning it from the pool. If a session is no longer valid, it is discarded.