- if (!pend || !*p)
- break; /* empty field or no trailing colon */
-
- /* ignore user IDs on subkeys */
- if (!is_uid && (*is_subkey && option (OPTPGPIGNORESUB)))
- break;
-
- dprint (2, (debugfile, "user ID: %s\n", p));
-
- uid = safe_calloc (sizeof (pgp_uid_t), 1);
- fix_uid (p);
- uid->addr = safe_strdup (p);
- uid->trust = trust;
- uid->flags |= flags;
- uid->parent = k;
- uid->next = k->address;
- k->address = uid;
-
- if (strstr (p, "ENCR"))
- k->flags |= KEYFLAG_PREFER_ENCRYPTION;
- if (strstr (p, "SIGN"))
- k->flags |= KEYFLAG_PREFER_SIGNING;
-
- break;
- }
- case 11: /* signature class */
- break;
- case 12: /* key capabilities */
- dprint (2, (debugfile, "capabilities info: %s\n", p));
-
- while(*p)
- {
- switch(*p++)
- {
- case 'D':
- flags |= KEYFLAG_DISABLED;
- break;
-
- case 'e':
- flags |= KEYFLAG_CANENCRYPT;
- break;
-
- case 's':
- flags |= KEYFLAG_CANSIGN;
- break;
- }
- }
-
- if (!is_uid &&
- (!*is_subkey || !option (OPTPGPIGNORESUB)
- || !((flags & KEYFLAG_DISABLED)
- || (flags & KEYFLAG_REVOKED)
- || (flags & KEYFLAG_EXPIRED))))
- k->flags |= flags;
-
- break;
-
- default:
+ if (!pend || !*p)
+ break; /* empty field or no trailing colon */
+
+ /* ignore user IDs on subkeys */
+ if (!is_uid && (*is_subkey && option (OPTPGPIGNORESUB)))
+ break;
+
+ debug_print (2, ("user ID: %s\n", p));
+
+ uid = mem_calloc (sizeof (pgp_uid_t), 1);
+ fix_uid (p);
+ uid->addr = str_dup (p);
+ uid->trust = trust;
+ uid->flags |= flags;
+ uid->parent = k;
+ uid->next = k->address;
+ k->address = uid;
+
+ if (strstr (p, "ENCR"))
+ k->flags |= KEYFLAG_PREFER_ENCRYPTION;
+ if (strstr (p, "SIGN"))
+ k->flags |= KEYFLAG_PREFER_SIGNING;
+