4

agent: Add support for Windows OpenSSH agent by yodaldevoid · Pull Request #517...

 3 years ago
source link: https://github.com/libssh2/libssh2/pull/517
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

yodaldevoid commented on Sep 14

edited

I threw this together over a few days loosely based on the corresponding code in OpenSSH.

Things left to clean up:

  • test it
    • I have tested this with a quick program authenticating with [email protected] with just libssh2 and another program that clones a repo from Github over ssh using libgit2 (which uses libssh2). I don't see a way to run automated tests against the Windows OpenSSH agent currently as it has a hard-coded pipe path making it impossible to run two agents at the same time.
  • Figure out license shenanigans
    • The license for the code modified from Portable OpenSSH is the two-clause BSD license under Markus Friedl and Microsoft Corp., separately. I have added the license information alongside the code section and added these two copyright holders to the COPYING file. There is an additional copyright by Tatu Ylonen that is (as far as I can tell) compatible and does not require any copy of outside of code, and as such it was also included alongside the code section. Please let me know if any of this has not been done correctly.
  • Support async IO
    • Some of the underlying agent code supports async IO, but not all. As such, I have implemented support for async IO as best as I could, but the code is currently not used as the pipe is opened as synchronous. I've left a comment stating what needs to be done to enable asynchronous operations.

Fixes #501


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK