After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772366 - support for keys provided by pkcs11 libraries in ssh agent
support for keys provided by pkcs11 libraries in ssh agent
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: ssh-agent
unspecified
Other Linux
: Normal major
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on: 775981
Blocks:
 
 
Reported: 2016-10-03 13:57 UTC by Roman Valov
Modified: 2018-03-09 15:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Roman Valov 2016-10-03 13:57:18 UTC
The `ssh-add` utility has flags -s/-e to add/remove keys provided by PKCS#11 libraries to ssh-agent, here is log of `ssh-add` commands used with standard `ssh-agent`:

    reddot@docorp:~$ ssh-add -e /usr/lib/libeTPkcs11.so
    Card removed: /usr/lib/libeTPkcs11.so
    reddot@docorp:~$ ssh-add -s /usr/lib/libeTPkcs11.so
    Enter passphrase for PKCS#11: 
    Card added: /usr/lib/libeTPkcs11.so
    reddot@docorp:~$ ssh-add -l
    2048 SHA256:........................................... /usr/lib/libeTPkcs11.so (RSA)
    2048 SHA256:........................................... /usr/lib/libeTPkcs11.so (RSA)

Unfortunately ssh agent interface provided by gnome-keyring daemon refuses such requests:

    reddot@docorp:~$ SSH_AUTH_SOCK=/run/user/1000/keyring/ssh ssh-add -e /usr/lib/libeTPkcs11.so
    Could not remove card "/usr/lib/libeTPkcs11.so": agent refused operation
    reddot@docorp:~$ SSH_AUTH_SOCK=/run/user/1000/keyring/ssh ssh-add -s /usr/lib/libeTPkcs11.so
    Enter passphrase for PKCS#11: 
    Could not add card "/usr/lib/libeTPkcs11.so": agent refused operation
Comment 1 Stef Walter 2016-12-12 12:55:58 UTC
 gnome-keyring should just wrap stock ssh-agent to solve this problem.
Comment 2 Stef Walter 2016-12-12 12:56:18 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=775981