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

Not catching AgentFailureException in client mode #28

Closed
dlech opened this issue Jan 14, 2013 · 4 comments
Closed

Not catching AgentFailureException in client mode #28

dlech opened this issue Jan 14, 2013 · 4 comments
Labels
Milestone

Comments

@dlech
Copy link
Owner

dlech commented Jan 14, 2013

-2013-01-14_08 28 03

@markschuh
Copy link

Same error here (using KeeAgent Beta 0.3.3 inside KeePass 2.20.1, pageant v0.62)

Exception only occurs if an already existing key is added to pageant..

Looks as if pageant answers with SSH_AGENT_FAILURE in case the key is already loaded.

lines 1089-1096 from WINDOWS\WINPGNT.C in putty v0.62 sources:
ret[4] = SSH_AGENT_FAILURE;
if (add234(rsakeys, key) == key) {
keylist_update();
ret[4] = SSH_AGENT_SUCCESS;
} else {
freersakey(key);
sfree(key);
}

@dlech
Copy link
Owner Author

dlech commented Jan 16, 2013

@markschuh You are exactly correct. All I can do is get a better error message and point this out in the documentation.

@markschuh
Copy link

Fair enough, a valid solution for this isue. It is probably only a corner case.
I personally only stumbled over this issue during migration from Pageant to KeeAgent. I really appreciate KeeAgent!

On the other side: As an enhancement request it might work, if first GetAllKeys is executed, I assume it could than be checked, if the new key is already in this list. If yes, AddKey could be skipped. Might introduce new problems, though.

@dlech
Copy link
Owner Author

dlech commented Feb 7, 2013

Should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants