diff options
Diffstat (limited to 'g10/import.c')
-rw-r--r-- | g10/import.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/g10/import.c b/g10/import.c index 9fbebf39d..48f0d5459 100644 --- a/g10/import.c +++ b/g10/import.c @@ -1058,7 +1058,12 @@ read_block( IOBUF a, unsigned int options, switch (pkt->pkttype) { case PKT_COMPRESSED: - if (check_compress_algo (pkt->pkt.compressed->algorithm)) + if (!(opt.compat_flags & COMPAT_COMPR_KEYS)) + { + rc = GPG_ERR_UNEXPECTED_PACKET; + goto ready; + } + else if (check_compress_algo (pkt->pkt.compressed->algorithm)) { rc = GPG_ERR_COMPR_ALGO; goto ready; |