mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Some compatibility polish for PGP2. Add a fake IDEA preference for v3
keys (this is in the RFC), so that they can be (sometimes) used along OpenPGP keys. Do not force using IDEA on an OpenPGP key, as this may violate its prefs. Also, revise the help text for the sig class explanation.
This commit is contained in:
parent
5a92c6052f
commit
1dbd67b96a
9 changed files with 94 additions and 17 deletions
|
@ -966,8 +966,15 @@ select_algo_from_prefs( PK_LIST pk_list, int preftype )
|
|||
u32 mask[8];
|
||||
|
||||
memset( mask, 0, 8 * sizeof *mask );
|
||||
if( preftype == PREFTYPE_SYM )
|
||||
mask[0] |= (1<<2); /* 3DES is implicitly there */
|
||||
if( preftype == PREFTYPE_SYM ) {
|
||||
if( pkr->pk->version < 4 && pkr->pk->selfsigversion < 4 )
|
||||
mask[0] |= (1<<1); /* IDEA is implicitly there for v3 keys
|
||||
with v3 selfsigs (rfc2440:12.1).
|
||||
This doesn't mean it's actually
|
||||
available, of course. */
|
||||
else
|
||||
mask[0] |= (1<<2); /* 3DES is implicitly there for everyone else */
|
||||
}
|
||||
|
||||
if (pkr->pk->user_id) /* selected by user ID */
|
||||
prefs = pkr->pk->user_id->prefs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue