Re: Using GPGAgent as SSHAgent on Windows with cygwin/mingw

2018-02-13 Thread Sandun Weerawardane
Hi, Did you able to connect SSH using gpg-agent?
I'm having the same issue here:
https://superuser.com/questions/1293725/gpg-agent-under-windows-as-ssh-agent-for-git-bash
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Using GPGAgent as SSHAgent on Windows with cygwin/mingw

2016-09-24 Thread Werner Koch
On Sat, 24 Sep 2016 14:10, fe...@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
gpg-agent.

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.


Salam-Shalom,

   Werner


==
commit 6d4a8ee2a6c749eec70bd3ae804f21456e375727
Author: Werner Koch 
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.
(_assuan_sock_get_flag): Ditto.
(do_readn, do_writen): New.
(_assuan_sock_bind): Create a Cygwin socket file depending on a socket
flag.
(_assuan_sock_connect): Handle the cygwin socket protocol.
(_assuan_sock_check_nonce): Ditto.
--

This code has not been tested.

Signed-off-by: Werner Koch 

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


pgpAlsrB4tJow.pgp
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Using GPGAgent as SSHAgent on Windows with cygwin/mingw

2016-09-24 Thread Felix Winterhalter
So I am currently trying to get gpg-agent to play nice with ssh on
Windows. I'm running gpg version 2.1.15.

Using Linux I was able to get everything to run the way I want by adding

enable-ssh-support to the agent config

and setting the environment variable
SSH_AUTH_SOCK to the gpg agents ssh socket.

However on Windows I now get the error:

 ssh-add -L
Error connecting to agent: Bad file descriptor

Same for simple ssh during the public key lookup stage.

I can read the socket file using cat or less however and I get:

52655
▒