Open ipaljak-tbtl opened 1 year ago
See #265 for some history
Thanks for the response.
I've tried to follow through the discussions in the issues/PR you've linked but I'm still not entirely sure what's the state with the TKMMS issue (https://github.com/iqlusioninc/tmkms/issues/37), and I'm probably missing some context beecause I'm not using TKMMS :)
Anyway, from what I understand, https://github.com/iqlusioninc/yubihsm.rs/pull/273 turned out to be the bugfix for the issue? Does that mean its safe to simply revert https://github.com/iqlusioninc/yubihsm.rs/pull/265?
If not, what is the intended way to close the session with the current API?
Sorry, I should've given more background.
While it's possible to revert #265 since the actual culprit was fixed in #273, it's lead me to question the wisdom of executing complicated code in drop handlers.
A panic in a drop handler is extremely painful to debug, which is why the original code was using panic::catch_unwind
and attempting to at least log the panic, but that could potentially panic as well.
I guess we could try reverting it and see if any problems arise. Things seem nicely stable now though which is why I worry a bit about it.
Hi,
I've noticed that, contrary to documentation,
yubihsm::session::Session
doesn't get closed when dropped.For example:
results in:
Ive also confirmed that implementing a custom
Drop
onSession
whereself.close()
is explicitly called fixes this issue.Would you mind accepting a PR with this fix?