]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Support synchronous agent requests on Unix.
authorSimon Tatham <anakin@pobox.com>
Mon, 11 May 2015 16:12:40 +0000 (17:12 +0100)
committerSimon Tatham <anakin@pobox.com>
Mon, 11 May 2015 16:52:19 +0000 (17:52 +0100)
commitb4f17f26e376757b8426853b4240b6545d6a91df
treef6f01757079b29c805a416c012cf8806427bc7b0
parent8228085c540edbe822529699025641a05fae383f
Support synchronous agent requests on Unix.

This is only intended for use in Unix Pageant; for any application
that's actually trying to get something else useful done at the same
time as the agent request is pending, it's much more sensible to use
the more rigorous existing approach of requesting a callback once the
agent request is answered.

Adding this mode is the easiest way to allow Unix Pageant's
command-line key loading to work, but it doesn't solve the underlying
problem that the supposedly cross-platform pageant_add_keyfile will
not work on a platform where we really _are_ constrained to do agent
requests asynchronously (perhaps because we're a GUI app in some
system that doesn't let us control our own top-level event loop).

If and when that situation arises, I'll have no choice but to turn
pageant_add_keyfile and friends (specifically, any function in
pageant.c that calls agent_query) into coroutine-structured functions,
and have clients call them repeatedly until they return 'finished'.

But for now, this is a lot easier!
unix/uxagentc.c