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 659080 - gpg-agent: Bad error code in response to GETINFO
gpg-agent: Bad error code in response to GETINFO
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: gpg-agent
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-09-14 18:21 UTC by Michael Terry
Modified: 2011-09-14 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (949 bytes, patch)
2011-09-14 18:33 UTC, Michael Terry
accepted-commit_now Details | Review

Description Michael Terry 2011-09-14 18:21:02 UTC
When gnome-keyring's gpg-agent gets a GETINFO request that it doesn't understand, it returns error code 100.  This, as you can see in /usr/include/gpg-error.h, is "Bad CA certificate".

You can reproduce this by installing gnupg2, and running "gpg2 --symmetric".  You'll see an error printed out about a bad CA certificate.

This is because gnupg2 by default calls "GETINFO s2k_count" of the agent.  You can avoid this by passing a non-zero --s2k-count.

The correct code for non-understood GETINFO argument is 280 (GPG_ERR_ASS_PARAMETER).  You can see that gnupg2's own gpg-agent does this and that gnupg2 understands that return code as "not implemented" and then will use its own default s2k_count.

Patch coming.
Comment 1 Michael Terry 2011-09-14 18:33:03 UTC
Created attachment 196532 [details] [review]
Proposed patch
Comment 2 Stef Walter 2011-09-14 18:46:49 UTC
Review of attachment 196532 [details] [review]:

Thanks! Looks good. Please go ahead and merge to gnome-keyring master.

BTW, it would need to be merged before the code freeze on Monday. Let me know if that doesn't work for you.
Comment 3 Michael Terry 2011-09-14 18:50:25 UTC
commit 0c79fff27d840d5791cbb5abc838fb30463e3efa
Author: Michael Terry <michael.terry@canonical.com>
Date:   Wed Sep 14 14:32:12 2011 -0400

    gpg-agent: return correct error code for unimplemented GETINFO requests
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659080