GNOME Bugzilla – Bug 659080
gpg-agent: Bad error code in response to GETINFO
Last modified: 2011-09-14 18:50:25 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.
Created attachment 196532 [details] [review] Proposed patch
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.
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