Werner Koch
ce8ffd71b7
gpg: Detect already compressed data also when using a pipe.
...
* common/iobuf.c (file_filter_ctx_t): Add fields for the peek feature.
(file_filter): Implement peeking.
(iobuf_ioctl): Add new IOBUF_IOCTL_PEEK.
* common/iobuf.h (IOBUF_IOCTL_PEEK, IOBUFCTRL_PEEK): New.
* common/miscellaneous.c (is_file_compressed): Rewrite. Detect PDF.
* g10/encrypt.c (encrypt_simple): Peek before detecting compression.
(encrypt_crypt): Ditto.
* g10/sign.c (sign_file): Also detect already compressed data.
* g10/options.h (opt): Add explicit_compress_option.
* g10/gpg.c (main): Set opt.explicit_compress_option for -z.
--
Note that this patch also introduces a compression check for signing
which was never done in the past.
GnuPG-bug-id: 6332
Backported-from-master: 60963d98cfd8e60f88ee43c2d992f6dd3bbbd74c
Note that sign.c (sign_file) has been re-indented to ease future
backports.
2023-01-19 16:14:03 +01:00
..
2017-05-11 18:12:37 +02:00
2022-11-25 13:56:15 +01:00
2022-10-31 14:33:10 +01:00
2022-08-16 14:07:38 +02:00
2022-08-16 13:02:25 +02:00
2022-10-07 13:37:09 +02:00
2021-05-03 20:28:33 +02:00
2022-11-30 08:56:05 +09:00
2016-11-02 12:53:58 +01:00
2022-11-15 17:22:32 +01:00
2017-04-11 13:52:19 +09:00
2018-05-02 20:15:10 +02:00
2022-06-14 11:39:31 +02:00
2017-08-01 19:08:16 +02:00
2022-08-29 13:07:43 +02:00
2019-05-17 13:42:42 +02:00
2022-10-31 14:33:10 +01:00
2020-03-18 15:26:43 +01:00
2021-11-13 21:02:22 +01:00
2021-05-04 11:51:34 +02:00
2023-01-19 16:14:03 +01:00
2021-06-08 10:52:45 +02:00
2016-11-05 12:02:19 +01:00
2022-12-06 09:27:12 +01:00
2022-10-31 14:33:10 +01:00
2021-10-06 20:03:34 +02:00
2021-05-04 10:23:20 +02:00
2015-02-04 09:15:34 +01:00
2023-01-19 16:14:03 +01:00
2018-03-08 14:08:51 +09:00
2020-10-02 17:04:12 +02:00
2022-10-31 14:33:10 +01:00
2017-03-07 20:25:54 +09:00
2016-11-05 12:02:19 +01:00
2020-10-02 17:04:12 +02:00
2022-03-18 11:55:17 +01:00
2020-10-02 17:04:12 +02:00
2017-03-07 20:25:54 +09:00
2022-11-25 13:56:22 +01:00
2022-11-25 13:56:22 +01:00
2020-09-02 16:06:46 +02:00
2017-07-27 11:38:57 +02:00
2018-07-09 12:07:24 +02:00
2018-07-09 10:25:06 +02:00
2020-11-10 12:09:11 +01:00
2022-11-25 13:56:22 +01:00
2022-11-15 17:24:04 +01:00
2022-11-15 17:24:04 +01:00
2022-11-25 13:58:14 +01:00
2023-01-13 14:54:20 +01:00
2022-11-15 17:22:32 +01:00
2020-10-23 11:15:59 +02:00
2017-03-31 20:07:20 +02:00
2021-05-26 14:30:17 +02:00
2021-06-25 10:35:24 +02:00
2022-11-15 17:22:32 +01:00
2022-11-28 08:22:51 +01:00
2022-10-18 10:24:54 +09:00
2017-03-07 20:25:54 +09:00
2020-10-21 21:09:38 +02:00
2022-10-31 14:33:10 +01:00
2021-06-10 12:44:30 +02:00
2023-01-19 16:14:03 +01:00
2022-03-18 11:55:17 +01:00
2022-05-05 14:02:02 +02:00
2021-05-17 19:30:15 +02:00
2021-03-01 09:47:21 +01:00
2016-11-05 12:02:19 +01:00
2022-10-31 14:33:10 +01:00
2021-05-04 11:51:34 +02:00
2021-05-04 11:51:34 +02:00
2022-11-29 11:48:55 +01:00
2017-03-07 20:25:54 +09:00
2021-05-04 11:51:34 +02:00
2017-01-23 19:16:55 +01:00
2020-10-28 18:10:01 +01:00
2017-02-21 13:11:46 -05:00
2016-11-05 12:02:19 +01:00
2017-03-07 20:32:09 +09:00
2017-03-07 20:25:54 +09:00
2017-04-28 10:06:33 +09:00
2021-10-13 17:34:12 +02:00
2023-01-19 16:14:03 +01:00
2021-05-04 10:06:57 +02:00
2017-03-30 16:01:52 +02:00
2015-11-17 14:53:03 +01:00
2015-09-02 15:08:57 +02:00
2016-11-05 12:02:19 +01:00
2016-11-05 12:02:19 +01:00
2016-03-08 14:08:49 +01:00
2017-05-10 11:13:03 +09:00
2021-11-13 20:59:17 +01:00
2021-11-13 20:59:17 +01:00
2021-11-13 20:59:17 +01:00
2022-03-18 11:55:17 +01:00
2020-02-10 16:37:34 +01:00
2020-09-04 11:24:34 +02:00
2020-10-23 11:15:59 +02:00
2016-12-06 12:16:56 +01:00
2022-01-17 13:58:58 +09:00
2022-11-25 13:56:24 +01:00
2022-01-17 13:58:58 +09:00
2020-02-10 15:33:53 +01:00
2016-11-05 12:02:19 +01:00