Page MenuHome GnuPG

enable-ssh-support in windows is broken.
Closed, InvalidPublic

Description

I was trying to get it to work on windows, where it is implemented as a tcp socket. But the command handler in ssh coverts it to an estream_t file descriptor from libgpg-error where read/writes are done with posix calls, which doesn't work for win32 sockets.(compiled with mingw-gcc).

https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=agent/command-ssh.c;h=d6729b70a4c56c4e3d13f30c7998596427c412a8;hb=refs/heads/STABLE-BRANCH-2-2#l598

You get Bad File Descriptor in es_read and the handle gets closed immediately.

Details

Version
2.2

Event Timeline

estream_t does not necessary work with stdio or posix calls; that is an implementation detail. For example if you use the mode flag "nonblock" Read/WriteFile are used on Windows.

But right, the support for the Cygwin way of implementing pipes (for example for the Cygwin OpenSSH) has never been tested and implemented by me in blind flight mode. I don't think this has any future.

The now standard OpenSSH on Windows works different and it should be supported. Let's keep on tracking this at T3883.