NoMoreFood / putty-cac

Windows Secure Shell Client With Support For Smart Cards, Certificates, & FIDO Keys
482 stars 43 forks source link

configuration window freezes when I either attempt to "Set CAPI Cert" or "Set FIDO Key" #98

Closed xeniphon closed 2 years ago

xeniphon commented 2 years ago

When I attempt to use either 0.77 or 0.77-1 with my PIV, I am never prompted to select the key. After I poke the "Set CAPI Cert" the UI locks up. No combination of alt-tab, drag-and-drop, or task-view makes it visible, and I can no longer move the putty window around on the screen. 0.76-4 still functions exactly as I expect. The FIDO button does exactly the same thing as the CAPI button.

NoMoreFood commented 2 years ago

This is very odd. Both the FIDO/CAPI buttons just create a list of valid certificates and call CryptUIDlgSelectCertificateFromStore() with a parent window value of NULL which normally defaults to the desktop window. Do you have any application that might be adjusting the foreground window? Does it also happen when using those same buttons in Pageant? Can you clear our your certificate store and see it still behaves oddly (it should just say no certificates are selectable until they are repopulated from your card at next logon)?

If possible, could you see if you create a new account / profile on the computer do you have the issue?

What version / feature release of Windows are you using?

xeniphon commented 2 years ago

Do you have any application that might be adjusting the foreground window? I don't think so, but with some combination of XDR and DLP toys may be interfering. I'm not yet sure how to narrow that down.

Does it also happen when using those same buttons in Pageant? Yes

Can you clear our your certificate store and see it still behaves oddly (it should just say no certificates are selectable until they are repopulated from your card at next logon)? I cleared out all my PIV certs and the UI still gets stuck.

If possible, could you see if you create a new account / profile on the computer do you have the issue? I'm on GFE and the workstation management is mostly out of my hands - however I first noticed this while talking a new user through accessing the *nix systems. I can say it's fairly consistent across at least two user accounts.

What version / feature release of Windows are you using? Windows 10, 20H2

NoMoreFood commented 2 years ago

Okay thank you for the information. Do you have any smartcard middleware installed like ActivClient and, if so, what version? Or anything else you think might be unique about your environment that I need to account for?

NoMoreFood commented 2 years ago

@xeniphon Also, if I provide you a private build of PuTTY CAC that has a few message box popups to affirm that it's CryptUIDlgSelectCertificateFromStore() that is the issue, are you able to try running it?

NoMoreFood commented 2 years ago

Closing due to non-responsiveness.