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

KeePass with KeeAgent freezing for 60 seconds #40

Open
dioss-Machiel opened this issue Oct 22, 2024 · 0 comments
Open

KeePass with KeeAgent freezing for 60 seconds #40

dioss-Machiel opened this issue Oct 22, 2024 · 0 comments

Comments

@dioss-Machiel
Copy link

First of all, thank you for creating this, it has been a real timesaver!

Today I decided to store some of my SHH keys in KeePass in combination with KeeAgent. However I noticed that everytime I tried to load a key it would hang KeePass for about 60 seconds.

I found the "Verbose" release of winssh-pageant and ran it, with the following result:

PS C:\DEV\tmp> .\winssh-pageant.exe --verbose
2024-10-22 22:28:05 INF Starting winssh-pageant
2024-10-22 22:28:05 INF Pageant pipe proxy started
2024-10-22 22:28:05 DBG Locked OS Thread
2024-10-22 22:28:05 DBG Allocated global memory for message data, Starting message loop
2024-10-22 22:28:12 DBG Received WM_COPYDATA message
2024-10-22 22:28:12 DBG Passed security checks
2024-10-22 22:28:12 DBG Received pageant request message of size: 286
2024-10-22 22:28:12 DBG Querying OpenSSH Agent pipe_name="\\\\.\\pipe\\openssh-ssh-agent"
2024-10-22 22:28:12 DBG Dialing agent pipe
2024-10-22 22:28:12 DBG Dialed successfully
2024-10-22 22:28:12 DBG Writing putty request to openssh pipe
2024-10-22 22:28:12 DBG request wrote successfully, reading response
2024-10-22 22:28:12 DBG message size: 1
2024-10-22 22:28:12 DBG reply code: 6
2024-10-22 22:29:12 ERR cannot read response message contents from openssh pipe error="i/o timeout"
2024-10-22 22:29:12 DBG Sent request to openssh handler, result size: 5
2024-10-22 22:29:12 DBG Copied 5 elements to shared memory
2024-10-22 22:29:12 DBG Received WM_COPYDATA message
2024-10-22 22:29:12 DBG Passed security checks
2024-10-22 22:29:12 DBG Received pageant request message of size: 952
2024-10-22 22:29:12 DBG Querying OpenSSH Agent pipe_name="\\\\.\\pipe\\openssh-ssh-agent"
2024-10-22 22:29:12 DBG Dialing agent pipe
2024-10-22 22:29:12 DBG Dialed successfully
2024-10-22 22:29:12 DBG Writing putty request to openssh pipe
2024-10-22 22:29:12 DBG request wrote successfully, reading response
2024-10-22 22:29:12 DBG message size: 1
2024-10-22 22:29:12 DBG reply code: 6
2024-10-22 22:30:12 ERR cannot read response message contents from openssh pipe error="i/o timeout"
2024-10-22 22:30:12 DBG Sent request to openssh handler, result size: 5
2024-10-22 22:30:12 DBG Copied 5 elements to shared memory

After a while it became clear that a message size of "1" means that there is only a reply code, and no further data, however, the code was still trying to read data from the pipe.

I patched to code and adding keys with KeeAgent started working without freezing!

I created a PR with my fix: #39, however, feel free to implement this fix any way you see fit, I'm not a seasoned go developer.

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

1 participant