GnuPG and SSH_AUTH_SOCK value

Werner Koch wk at gnupg.org
Fri Jun 21 15:13:45 CEST 2019


On Fri, 21 Jun 2019 11:20, guru at unixarea.de said:

> What I do not understand is, why this value without the KDE5 environment
> is
>
> $ gpgconf --list-dirs agent-ssh-socket
> /home/guru/.gnupg-ccid/S.gpg-agent.ssh

That is because you have a
GNUPGHOME=/home/guru/.gnupg-ccid
and  /var/run/users/1001  does not exist.

> and after start of Xorg and KDE5 it is:
>
> $ gpgconf --list-dirs agent-ssh-socket
> /var/run/user/1001/gnupg/d.m4rfaasqebhjmgto9ddm6m7y/S.gpg-agent.ssh

/var/run/users/1001 has been created (systemd mess?) and thus GnuPG
expects ist sockets below /var/run/user/<UID>.  The token is the hash of
the homedir's name so that we don't get a too long path.

 $ echo -n /home/guru/.gnupg-ccid | sha1sum | cut -d ' ' -f1 | undump |zb32
 m4rfaasqebhjmgto9ddm6m7yfhgj8yc8

undump does the obvious and zb32 is like base64 but encodes using 
Zooko's Base32 encoding.


Shalom-Salam,

   Werner


ps:
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=wk-misc.git;a=blob;f=zb32.c
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=wk-misc.git;a=blob;f=undump.c

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20190621/1246ea7a/attachment.sig>


More information about the Gnupg-users mailing list