else
return NULL;
- if (!is_uid)
+ if (!(is_uid || (*is_subkey && option (OPTPGPIGNORESUB))))
k = safe_calloc (sizeof (pgp_key_t), 1);
break;
dprint (2, (debugfile, "key len: %s\n", p));
- k->keylen = atoi (p); /* fixme: add validation checks */
+ if (!(*is_subkey && option (OPTPGPIGNORESUB)))
+ k->keylen = atoi (p); /* fixme: add validation checks */
break;
}
case 4: /* pubkey algo */
dprint (2, (debugfile, "pubkey algorithm: %s\n", p));
- k->numalg = atoi (p);
- k->algorithm = pgp_pkalgbytype (atoi (p));
+ if (!(*is_subkey && option (OPTPGPIGNORESUB)))
+ {
+ k->numalg = atoi (p);
+ k->algorithm = pgp_pkalgbytype (atoi (p));
+ }
+
k->flags |= pgp_get_abilities (atoi (p));
break;
}
dprint (2, (debugfile, "key id: %s\n", p));
/* We really should do a check here */
- k->keyid = safe_strdup (p);
+ mutt_str_replace (&k->keyid, p);
break;
}
mutt_wait_filter (thepid);
close (devnull);
-
return db;
}
** \fIpgp-menu\fP, when encryption is not required or signing is
** requested as well.
*/
+ { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPTPGPIGNORESUB, 1},
+ /*
+ ** .pp
+ ** Setting this variable will cause Mutt to ignore OpenPGP subkeys. Instead,
+ ** the principal key will inherit the subkeys' capabilities. Unset this
+ ** if you want to play interesting key selection games.
+ */
{ "pgp_entry_format", DT_STR, R_NONE, UL &PgpEntryFormat, UL "%4n %t%f %4l/0x%k %-4a %2c %u" },
/*
** .pp