tillitis / tkey-ssh-agent

SSH Agent for TKey, the flexible open hardware/software USB security key 🔑
https://www.tillitis.se
BSD 2-Clause "Simplified" License
131 stars 15 forks source link

tkey-ssh-agent: check agent-path existance also on win; show notification #80

Closed quite closed 10 months ago

dehanj commented 10 months ago

Rearranged and fix an issue that, if an agent already is running with the same agentPath, this instance would remove the agentPath for the already running agent when exiting.

dehanj commented 10 months ago

Rebased on main, and restored gotools/go-winres which we accidentally removed when we moved golangci-lint to GH actions.

Also tested the results on windows and mac.

dehanj commented 10 months ago

The problem seems to be that the exit-function including the agentPath-removal has been moved below signer := NewSigner(devPath, speed, enterUSS, fileUSS, pinentry, exit), which takes the exit-function as an input. So when one does Ctrl-C it is not removing the agentPath. The error is present in main, but not in v0.0.6 release. Will fix tomorrow.