aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index 20fa7d8b8..3b220d7f7 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -781,9 +781,9 @@ list_keyblock_colon( KBNODE keyblock, int secret )
}
/*
- * Reorder the keyblock so that the primary user ID comes first.
- * Fixme: Replace this by a generic sort function.
- */
+ * Reorder the keyblock so that the primary user ID (and not attribute
+ * packet) comes first. Fixme: Replace this by a generic sort
+ * function. */
static void
reorder_keyblock (KBNODE keyblock)
{
@@ -791,8 +791,9 @@ reorder_keyblock (KBNODE keyblock)
KBNODE last, node;
for (node=keyblock; node; primary0=node, node = node->next) {
- if( node->pkt->pkttype == PKT_USER_ID
- && node->pkt->pkt.user_id->is_primary ) {
+ if( node->pkt->pkttype == PKT_USER_ID &&
+ !node->pkt->pkt.user_id->attrib_data &&
+ node->pkt->pkt.user_id->is_primary ) {
primary = primary2 = node;
for (node=node->next; node; primary2=node, node = node->next ) {
if( node->pkt->pkttype == PKT_USER_ID