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 312064 - Default Key Widget makes it impossible to Distinguish between identically labeled keys
Default Key Widget makes it impossible to Distinguish between identically lab...
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: 2.28.0
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2005-07-30 16:38 UTC by Adam Schreiber
Modified: 2012-03-09 17:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes Bug as Nate Suggests (1.96 KB, patch)
2005-11-10 03:29 UTC, Adam Schreiber
reviewed Details | Review
Differentiates key ids (3.91 KB, patch)
2006-05-17 01:57 UTC, Adam Schreiber
reviewed Details | Review

Description Adam Schreiber 2005-07-30 16:38:19 UTC
1. Create a key and label exactly like another. i.e. Same name and/or email address.

2. Open Preferences and select encryption settings.

3. Default key widget shows the same information for both key pairs

Solution: Add keyid to default key widget
Comment 1 Stef Walter 2005-08-01 17:18:56 UTC
Good point. Although so we don't overwhelm the user we should probably only
display IDs for keys that would otherwise display the same text. 
Comment 2 Stef Walter 2005-08-01 18:17:26 UTC
Hmmm, after thinking of it further (and thinking of the future work I'm going to
do) the way to implement this would be to create a SeahorseKey property:
display-name (and accompanying seahorse_key_get_display_name). This property
would calculate the name properly (appending the Key ID if needed) and we'd use
this everywhere we currently lookup the first UID.

I think this would help make things consistent. 
Comment 3 Adam Schreiber 2005-11-10 03:29:09 UTC
Created attachment 54553 [details] [review]
Fixes Bug as Nate Suggests
Comment 4 Adam Schreiber 2005-11-10 03:30:34 UTC
I added a seperate function because the short id showed up in the key manager as
well, right next to the key id column.
Comment 5 Stef Walter 2005-11-10 16:42:58 UTC
I think the patch only adds the keyid when there's no email or comment. The
original plan was to add a short keyid only when two keys (anywhere in a
seahorse context) had identical username/email/comment. 

My implementation comments applied to seahorse before we refactored everything.
The way to do it now would probably be in SeahorseContext, that's the only place
that knows about all the keys that exist, and it could find colisions (maybe
using a GQuarks or GHashtable, not sure exactly how I would do this) between
display names and append the keyid. A function like
seahorse_context_get_key_display_name would be necessary. 

Or maybe there's a simpler way to handle this?
Comment 6 Adam Schreiber 2006-03-12 14:41:10 UTC
Could a function similar to the filter on the key manager window work?  Limit the results to the private keyset and when the results are greater than 1 append the short id.
Comment 7 Adam Schreiber 2006-05-17 01:57:11 UTC
Created attachment 65628 [details] [review]
Differentiates key ids

This patch implements two callback functions that determine if an additional identifier is needed and appends the short keyid if a duplicate display name is found.
Comment 8 Stef Walter 2006-05-17 03:00:19 UTC
I was sort of thinking of doing this in SeahorseContext, so we can have this support everywhere. It's a bit complex though, so I've been putting it off.
Comment 9 Adam Schreiber 2006-07-28 17:37:02 UTC
Idea:  When a key is loaded, the Display name is loaded into a hash table, with the key id attatched, i.e. openpgp:FFFFFFFFFFFFFFFF.  When someone queries the Display-Name property, the code that grabs that and returns it checks the hash table in the context first to see if the keyid returns matches it's own.  If it doesn't, it appends the short keyid onto the display name.  This of course would depend on the more unified key name bug.
Comment 10 André Klapper 2009-03-15 16:48:00 UTC
I don't consider this a GNOME 2.28 target blocker.
Setting the module specific target milestone instead.
Comment 11 Stef Walter 2009-03-17 02:57:50 UTC
Yes, I used the wrong field. Sorry for the extra work.
Comment 12 Siegfried Gevatter (RainCT) 2009-08-31 20:49:35 UTC
Any plans on fixing this in time for 2.28? Seeing two identical keys in seahorse-preferences is pretty disappointing.
Comment 13 Stef Walter 2012-03-09 17:36:55 UTC
Fixed in gnome-3-4 branch.


commit aca5d826a827eff06de22c9742481d22f7cfe048
Author: Stef Walter <stefw@gnome.org>
Date:   Fri Mar 9 18:27:43 2012 +0100

    Fix issue when multiple keys with same label in signer list
    
     * Add keyid after the user id if there are multiple keys in the
       combo are the same.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=312064