You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C_Login can fail with CKR_USER_ALREADY_LOGGED_IN #61
In this case I think you're going to have to take care of it. We can't control how sessions to the HSM device are handled, since they're all handled separately.
I think the problem is you can't guarantee your connection to the HSM is still valid by the time you call C_Logout. Or whether the HSM library reset your connection in the meantime. It depends a lot on the setup of your HSM and I don't know how we'd handle it.
If your app can got to sleep, I would avoid holding long term sessions. From a pure security POV, if your app goes to sleep, you probably don't want to maintain a session to the HSM? Someone could have walked off with your laptop!
Activity
danni commentedon Jun 25, 2019
In this case I think you're going to have to take care of it. We can't control how sessions to the HSM device are handled, since they're all handled separately.
inorton commentedon Oct 8, 2019
Can you be sure that C_Logout is not called here?
danni commentedon Oct 9, 2019
I think the problem is you can't guarantee your connection to the HSM is still valid by the time you call
C_Logout. Or whether the HSM library reset your connection in the meantime. It depends a lot on the setup of your HSM and I don't know how we'd handle it.If your app can got to sleep, I would avoid holding long term sessions. From a pure security POV, if your app goes to sleep, you probably don't want to maintain a session to the HSM? Someone could have walked off with your laptop!