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 319409 - Can't sign imported public keys
Can't sign imported public keys
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
0.8.x
Other Linux
: Normal normal
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
: 346257 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-10-21 13:29 UTC by Yves-Gwenael Bourhis
Modified: 2006-07-02 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The diff file to get the problem solved (at least for me) (1.15 KB, patch)
2006-02-19 10:53 UTC, Daniel Rodriguez Garcia
committed Details | Review
Patch referenced above (836 bytes, patch)
2006-02-27 00:29 UTC, Adam Schreiber
none Details | Review

Description Yves-Gwenael Bourhis 2005-10-21 13:29:36 UTC
Distribution/Version: Mandriva 2006

When I try to sign and imported signature, nothing hapens.
If I do the same thing with seahorse launched from the command line, here I get
the following error message:

** Message: init gpgme version 1.0.3

** (seahorse:28642): CRITICAL **: file seahorse-key-op.c: line 360
(sign_transit): should not be reached

** (seahorse:28642): CRITICAL **: edit_key: assertion `GPG_IS_OK (err)' failed


Bug already posted here by me :
http://qa.mandriva.com/show_bug.cgi?id=19385

or also here by someone else:
https://launchpad.net/distros/ubuntu/+sources/seahorse/+bug/2559

-- 
Yves-Gwenael Bourhis
Comment 1 Adam Schreiber 2005-10-31 17:25:50 UTC
Could you please check and see if this is a duplicate of wither of these bugs:
http://bugzilla.gnome.org/show_bug.cgi?id=154987
http://bugzilla.gnome.org/show_bug.cgi?id=171508

Also, the mandriva bug says 0.79, your bug report here indicates 0.9x which is
CVS HEAD.  Could you please clarify which version you're testing with?
Comment 2 Yves-Gwenael Bourhis 2005-11-01 21:38:44 UTC
I'm terribly sorry for the wrong versionning.
It is 0.7.x indeed, I modified the versionning to correct this.
My appologies.

Concerning the following links :
http://bugzilla.gnome.org/show_bug.cgi?id=154987
http://bugzilla.gnome.org/show_bug.cgi?id=171508
I can't sign with seahorse, but seahorse doesn't crash at all (it's just that
nothing happens, and the above messages are displayed in the command line, but
without seahorse crashing/terminating) 
With gpg (from the command line) everything works fine with no problems an no
error messages.
I don't use seahorse-agent.
I tryed kgpg and that also worked.

I'll try a fresh install and new settings with a brand new keyring and keep you
informed, in case it would be a problem from the keyring isself (even though gpg
can handle it from the command line), which has gone threw three distro upgrades.
Comment 3 Yves-Gwenael Bourhis 2005-11-02 13:35:47 UTC
I tried with fresh settings, the problem remains.
I deleted my seahorse install and compiled the fresh official package from here:
http://seahorse.sourceforge.net/
I compilled and installed seahorse-0.7.9.tar.gz

The bug remains the exact same.

I installed gpa and : same problem!!!! gpa won't sign!!!
I now wonder if there would not be a bug in our gpgme library itsself :
[qa@sleipnir keys]$ rpm -qa | grep gpgme
libgpgme11-devel-1.0.3-1mdk
libgpgme11-1.0.3-1mdk

our gpg version is:
gpgp-0.4-10mdk

we also have two default gnupg packages installed:
[qa@sleipnir keys]$ rpm -qa | grep -i gnupg
gnupg2-1.9.16-4mdk
gnupg-1.4.2-2mdk
Comment 4 Adam Schreiber 2005-12-02 20:37:13 UTC
User provided info, reopening so the bug report isn't lost.
Comment 5 Yves-Gwenael Bourhis 2006-01-04 15:57:09 UTC
Concerning this bug and:
http://qa.mandriva.com/show_bug.cgi?id=19385
https://launchpad.net/distros/ubuntu/+source/seahorse/+bug/2559

I noticed on mandriva 2006 that it is an incompatibility between seahorse-0.7.9 and libgpgme11+gnupg-1.4.2 together
Indeed, GPA has the same BUG with this same libgpgme and gnupg version.

Debian had to patch seahorse and gpa to get it working with libgpgme11+gnupg-1.4.2 :
http://packages.debian.org/changelogs/pool/main/s/seahorse/seahorse_0.8.0-1/changelog
http://packages.debian.org/changelogs/pool/main/g/gpa/gpa_0.7.0-1/changelog

Would it be related to?:
http://bugzilla.gnome.org/show_bug.cgi?id=313329
Comment 6 Daniel Rodriguez Garcia 2006-02-18 09:15:40 UTC
Hello,

I'm using debian testing, seahorse version 0.8.0-1. I also confirm this bug: get the following error message when trying to sign an imported key:

** (seahorse:10700): CRITICAL **: file seahorse-key-op.c: line 360 (sign_transit): should not be reached

** (seahorse:10700): CRITICAL **: edit_key: assertion `GPG_IS_OK (err)' failed

Or (line number in seahorse-key-op.c changed):

** (seahorse:10636): CRITICAL **: file seahorse-key-op.c: line 384 (sign_transit): should not be reached

** (seahorse:10636): CRITICAL **: edit_key: assertion `GPG_IS_OK (err)' failed

My debian config is as follows:

ii  debconf [debconf-2.0]  1.4.70            Debian configuration management sy
ii  gconf2                 2.12.1-9          GNOME configuration database syste
ii  libart-2.0-2           2.3.17-1          Library of functions for 2D graphi
ii  libatk1.0-0            1.10.3-1          The ATK accessibility toolkit
ii  libbonobo2-0           2.10.1-1          Bonobo CORBA interfaces library
ii  libbonoboui2-0         2.10.1-2          The Bonobo UI library
ii  libc6                  2.3.5-13          GNU C Library: Shared libraries an
ii  libgconf2-4            2.12.1-9          GNOME configuration database syste
ii  libglade2-0            1:2.5.1-2         library to load .glade files at ru
ii  libglib2.0-0           2.8.6-1           The GLib library of C routines
ii  libgnome2-0            2.12.0.1-5        The GNOME 2 library - runtime file
ii  libgnomecanvas2-0      2.12.0-2          A powerful object-oriented display
ii  libgnomeui-0           2.10.1-1          The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0         2.12.2-5          GNOME virtual file-system (runtime
ii  libgnutls11            1.0.16-14         GNU TLS library - runtime library
ii  libgpg-error0          1.1-4             library for common error values an
ii  libgpgme11             1.1.0-1           GPGME - GnuPG Made Easy
ii  libgtk2.0-0            2.8.10-1          The GTK+ graphical user interface
ii  libice6                6.9.0.dfsg.1-4    Inter-Client Exchange library
ii  libldap2               2.1.30-12         OpenLDAP libraries
ii  libnautilus-extension1 2.12.2-2          libraries for nautilus components
ii  liborbit2              1:2.12.4-1        libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0          1.10.3-1          Layout and rendering of internatio
ii  libpopt0               1.7-5             lib for parsing cmdline parameters
ii  libsm6                 6.9.0.dfsg.1-4    X Window System Session Management
ii  libsoup2.2-8           2.2.6-1           an HTTP library implementation in
ii  libx11-6               6.9.0.dfsg.1-4    X Window System protocol client li
ii  libxml2                2.6.23.dfsg.1-0.1 GNOME XML library
ii  xlibs                  6.9.0.dfsg.1-4    X Window System client libraries m
ii  zlib1g                 1:1.2.3-9         compression library - runtime

seahorse recommends no packages.

-- debconf information:
* seahorse/SUID: true

Comment 7 Adam Schreiber 2006-02-18 15:49:59 UTC
At line 348 of src/seahorse-key-op, add the line:

else if (status == GPGME_STATUS_GET_BOOL && g_str_equal (args, "sign_uid.okay"))
				next_state = SIGN_CONFIRM;

This fixed the problem for me in HEAD.  Please let us know if this fixes the bug.
Comment 8 Daniel Rodriguez Garcia 2006-02-19 10:53:48 UTC
Created attachment 59694 [details] [review]
The diff file to get the problem solved (at least for me)
Comment 9 Daniel Rodriguez Garcia 2006-02-19 10:55:48 UTC
Hello, it WORKED, 

But I had to add the suggested line twice: 

1.- at "case SIGN_COMMAND:" case group, and,
2.- at "case SIGN_CONFIRM:" case group.

Adding only at 1. solves the problem when signing just 1 uid. In order to solve 
the problem when signing the whole key (all uids), I have found I must add the
same line also at 2.

I attached the diff file to get the problem solved before. 
Comment 10 Daniel Rodriguez Garcia 2006-02-19 11:06:29 UTC
I forgot...

Thank you :-)
Comment 11 Daniel Rodriguez Garcia 2006-02-19 11:22:15 UTC
Just one more piece of info, to justify the double patch:

I built several temporary versions of seahorse, 1. with just one line added, 2. (final) with the two lines added. I also added a "printf(args)" and "printf(some comments)" at the beginning of the function and got this output in console [note that line numbers are not correct due to printf statements]:

Sign key (all uids) [DEBUG FIXED VERSION 1]:
--------------------------------------
daniel@goliat:~/debian$ seahorse
** Message: init gpgme version 1.1.0
keyedit.prompt ---> Now I check another case
keyedit.prompt ---> Now I check another case
keyedit.sign_all.okay ---> Now I check another case
sign_uid.okay ---> Now I check another case

** (seahorse:3408): CRITICAL **: file seahorse-key-op.c: line 389 (sign_transit): should not be reached

** (seahorse:3408): CRITICAL **: edit_key: assertion `GPG_IS_OK (err)' failed

Sign one uid [DEBUG FIXED VERSION 1]:
-------------------------------
daniel@goliat:~/debian$ seahorse
** Message: init gpgme version 1.1.0
keyedit.prompt ---> Now I check another case
keyedit.prompt ---> Now I check another case
sign_uid.okay ---> Now I check another case
keyedit.prompt ---> Now I check another case
keyedit.save.okay ---> Now I check another case

Sign key (all uids) [DEBUG FIXED VERSION 2 (FINAL)]:
----------------------------------------------
daniel@goliat:~/debian$ seahorse
** Message: init gpgme version 1.1.0
keyedit.prompt ---> Now I check another case
keyedit.prompt ---> Now I check another case
keyedit.sign_all.okay ---> Now I check another case
sign_uid.okay ---> Now I check another case
keyedit.prompt ---> Now I check another case
keyedit.save.okay ---> Now I check another case

Sign one uid [DEBUG FIXED VERSION 2 (FINAL)]:
---------------------------------------
daniel@goliat:~/debian$ seahorse
** Message: init gpgme version 1.1.0
keyedit.prompt ---> Now I check another case
keyedit.prompt ---> Now I check another case
sign_uid.okay ---> Now I check another case
keyedit.prompt ---> Now I check another case
keyedit.save.okay ---> Now I check another case

Comment 12 Adam Schreiber 2006-02-19 14:12:09 UTC
Thanks for testing this.  I've committed it to stable and will forward port it to HEAD.

2006-01-19  Adam Schreiber  <sadam@clemson.edu>
    * src/seahorse-key-op.c: Fix state machine for signing keys.
    Patch by Daniel Rodriguez Garcia.  (Bug #319409)
Comment 13 Adam Schreiber 2006-02-27 00:27:27 UTC
In head, I had to edit the seahorse_pgp_key_get_actual_uid function in libseahorse/seahorse-pgp-key.c for the correct UID to be returned to the sign function.  I'll attach patch below and let me know if anyone else has the same problem.
Comment 14 Adam Schreiber 2006-02-27 00:29:26 UTC
Created attachment 60184 [details] [review]
Patch referenced above
Comment 15 Adam Schreiber 2006-07-02 20:11:01 UTC
*** Bug 346257 has been marked as a duplicate of this bug. ***