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 778607 - seahorse seems to be unable to handle KEY_CONSIDERED lines in gpgme output
seahorse seems to be unable to handle KEY_CONSIDERED lines in gpgme output
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2017-02-14 13:11 UTC by Tobias Mueller
Modified: 2017-03-29 08:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.89 KB, patch)
2017-02-14 21:06 UTC, Tobias Mueller
none Details | Review

Description Tobias Mueller 2017-02-14 13:11:32 UTC
on IRC someone was reporting that marking a key as trusted does not work.

<binaryplease> muelli: open seahorse, klick right on a key of a friend, properties, trust, tick "your trust of this key" -> https://imgur.com/a/K4rfM
<binaryplease> also this:
<binaryplease> muelli: open seahorse, klick right on a key of a friend, properties, trust, click sign, sign , https://imgur.com/a/IGeXw

The images, if they will be gone, show a rather uninteresting error pop up "Couldn't sign key, General error".

The app prints:
 (seahorse:14324): seahorse-CRITICAL **: file pgp/seahorse-gpgme-key-op.c: line 2420 (photoid_load_transit): should not be reached

When run under GDB the stacktrace indicates a failure to handle a "KEY_CONSIDERED" line that gpg2.1 introduced.

  • #2 g_log
  • #3 photoid_load_transit
    at pgp/seahorse-gpgme-key-op.c line 2429
  • #4 seahorse_gpgme_key_op_edit
    at pgp/seahorse-gpgme-key-op.c line 340
  • #5 0x00007ffff5b1a85c in
  • #3 photoid_load_transit
    at pgp/seahorse-gpgme-key-op.c line 2429
2424        case PHOTO_ID_LOAD_SELECT:
2425            if (status == GPGME_STATUS_GET_LINE && g_str_equal (args, PROMPT)) {
2426                next_state = PHOTO_ID_LOAD_OUTPUT_IMAGE;
2427            } else {
2428                *err = GPG_E (GPG_ERR_GENERAL);
2429                g_return_val_if_reached (PHOTO_ID_LOAD_ERROR);
2430            }
2431            break;
Comment 1 Tobias Mueller 2017-02-14 13:13:15 UTC
here's the announcement of gpg2.1 breaking API:
https://lists.gnupg.org/pipermail/gnupg-announce/2016q2/000390.html

I guess it's safe to ignore that line.
Comment 2 binaryplease 2017-02-14 13:14:25 UTC
If additional information is needed I can provide it (I'm the one experiencing the bug)
Comment 3 Tobias Mueller 2017-02-14 13:44:49 UTC
gpgme 1.7.0 introduced that status flag: https://lists.gnupg.org/pipermail/gnupg-commits/2016-May/012130.html

gpgme on current Ubuntu stable is 1.6.0 which is probably why I can't reproduce this issue.  But I expect anybody with a more recent gpgme to be affected (Fedora? OpenSuSE?).  I wonder whether there are downstream bug reports and maybe even patches.
Comment 4 binaryplease 2017-02-14 18:03:17 UTC
Tobias Mueller provided me with this patch to test:
https://gist.github.com/binaryplease/145dc96f9a55c567cf7521f25f62754b

I can confirm, that it works and solves the problem for me.
I'm using:

seahorse 3.20.0
GNUPG: /usr/bin/gpg2 (2.1.18)
The Code was pulled from the github repo for patching
Comment 5 binaryplease 2017-02-14 18:12:15 UTC
https://github.com/GNOME/seahorse/pull/2
Comment 6 İsmail Dönmez 2017-02-14 20:29:07 UTC
Patch also works for me with libgpgme 1.8.0
Comment 7 Tobias Mueller 2017-02-14 21:06:34 UTC
Created attachment 345761 [details] [review]
patch

this is an easy patch although bumping libgpgme to 1.7.0 might be an issue. Ubuntu stable ships 1.6.0, FWIW.
Comment 8 Stef Walter 2017-03-29 06:34:02 UTC
Thanks. Merged into git master. Fixed typos in the patch so it compiles.
Comment 9 Tobias Mueller 2017-03-29 08:45:23 UTC
Awesome.
FTR: cdfc5b297d7420e47b9c973e8b8cb1b0fb576421