aboutsummaryrefslogtreecommitdiffstats
path: root/g10/encode.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/encode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/encode.c b/g10/encode.c
index 6727c08ed..b635ce0b4 100644
--- a/g10/encode.c
+++ b/g10/encode.c
@@ -699,7 +699,7 @@ write_pubkey_enc_from_list( PK_LIST pk_list, DEK *dek, IOBUF out )
enc = m_alloc_clear( sizeof *enc );
enc->pubkey_algo = pk->pubkey_algo;
keyid_from_pk( pk, enc->keyid );
- enc->throw_keyid = opt.throw_keyid;
+ enc->throw_keyid = (opt.throw_keyid || (pk_list->flags&1));
if(opt.throw_keyid && (opt.pgp2 || opt.pgp6 || opt.pgp7))
{