Skip to content

piv: permit use of shared smartcard connections #182

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

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

tianon
Copy link

@tianon tianon commented Aug 23, 2025

Quoting #108 (comment):

I needed this, so I took the liberty of rebasing and updating it (which was a little non-trivial, especially in piv_test.go), and I think I've got the same spirit as all the changes here (many of which I had to reimplement green). 🙇

I've done some testing with it and it resolved a lot of issues I was having (I'm implementing something that can do ECDSA signatures via a YubiKey against this library, and before applying this, any concurrent attempts to sign would fail, and with this change I can happily make seemingly as many concurrent requests as I want and they just stack up, which is exactly how I want it 💖).

FWIW, I've been testing on a YubiKey 5C, although I will admit I have not run those updated tests (only verified that they compile correctly).

I've now been testing this very actively in a project that does a lot of concurrent accesses to a single YubiKey (via separate processes) to do ECDSA signing and it's been working like a champion for an entire month straight. 😄

Of course, I'm happy to rebase, amend, close, etc as desired! The branch has been out there linked from that PR for a bit but I figured maybe it'll be easier to look at/review if I explicitly opened it as a real PR. ❤️


Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
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

Successfully merging this pull request may close these issues.

Error: Unable to open the Yubikey card: connecting to smart card: the smart card cannot be accessed because of other connections outstanding
2 participants