Using GPGAgent as SSHAgent on Windows with cygwin/mingw
wk at gnupg.org
Sat Sep 24 20:40:26 CEST 2016
On Sat, 24 Sep 2016 14:10, felix at audiofair.de said:
> which seems to me to be a process ID + binary data. So the socket
> appears to be there and it is recreated when I restart gpg-agent.
On Windows an emulation of Unix Domain Sockets is used by putting a
cookie and a port number into a plain file which is then used by the
client to to a local TCP connection to that port and check the cookie.
The way Cygwin does that is different from the way GnUPG does that.
IIRC, Cygwin added the cookie only later. Thus the Unix emulated ssh
(using the Cyrwin dll) can't connect to native Windows program
We have code in libassuan/src/assuan-socket.c to cope with the Cygwin
socket emulation code (see below). However, that code was never tested
by me and in fact implemented in blind flight mode.
Author: Werner Koch <wk at gnupg.org>
Date: Tue Jun 30 16:24:52 2015 +0200
Support Cygwin local sockets.
* src/assuan-socket.c (cygwin_fdtable, cygwin_fdtable_cs): New.
(is_cygwin_fd, insert_cygwin_fd, delete_cygwin_fd): New.
(assuan_sock_init) [W32]: Init the CS.
(assuan_sock_deinit) [W32]: Deinit the CS.
(read_port_and_nonce): Add arg cygwin and detect Cygwin socket files.
(_assuan_sock_set_flag): Add "cygwin" flag.
(do_readn, do_writen): New.
(_assuan_sock_bind): Create a Cygwin socket file depending on a socket
(_assuan_sock_connect): Handle the cygwin socket protocol.
This code has not been tested.
Signed-off-by: Werner Koch <wk at gnupg.org>
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 162 bytes
Desc: not available
More information about the Gnupg-users