Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroying valid sessions #8

Closed
commonism opened this issue Oct 22, 2013 · 1 comment
Closed

Destroying valid sessions #8

commonism opened this issue Oct 22, 2013 · 1 comment

Comments

@commonism
Copy link
Contributor

Trying to access a non existing object results in all sessions to the token getting closed.

https://github.com/OpenSC/libp11/blob/master/src/p11_slot.c#L331

PKCS11_release_all_slots
pkcs11_release_slot
CRYPTOKI_call(ctx, C_CloseAllSessions(priv->id));

Closing only the current session as proposed here commonism@86a9429 (part of #7) is proposed therefore.

@nmav
Copy link
Contributor

nmav commented Aug 26, 2015

The patch isn't really correct. C_CloseAllSessions() closes all sessions in the current slot (not token), which is the expected behavior. Your change doesn't really close anything because you input a slot ID instead of session ID. I'm closing this issue, but feel free to reopen if I have misunderstood it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants