diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-06-18 19:18:56 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-06-19 11:41:00 +0200 |
commit | b2ee991c96698043f922b2b2d2dea77436db7549 (patch) | |
tree | bec005196021436ce88405ee40323aace72f4747 /openpgp/src/parse/packet_pile_parser.rs | |
parent | b6f578b052ca4356d787ee428b1b00820e0775ab (diff) |
openpgp, buffered-reader: Make compression an optional feature.
- This helps to reduce the trusted computing base if compression is
not needed.
- This makes it easier to fuzz Sequoia, previously the fuzzer was
doing a great job creating compression bombs that triggered the
fuzzers timeout.
- Currently, the cargo workspace feature does not propagate
--no-default-features, but it is possible to depend on the openpgp
crate with `default-features = false`.
- Unfortunately, a lot of test cases include compressed packages.
This change conditionally disables these tests.
Diffstat (limited to 'openpgp/src/parse/packet_pile_parser.rs')
-rw-r--r-- | openpgp/src/parse/packet_pile_parser.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/parse/packet_pile_parser.rs b/openpgp/src/parse/packet_pile_parser.rs index 3d48a8b0..f19deb81 100644 --- a/openpgp/src/parse/packet_pile_parser.rs +++ b/openpgp/src/parse/packet_pile_parser.rs @@ -13,6 +13,7 @@ use buffered_reader::{BufferedReader, BufferedReaderGeneric, BufferedReaderMemory}; #[cfg(test)] +#[allow(unused_macros)] macro_rules! bytes { ( $x:expr ) => { include_bytes!(concat!("../../tests/data/messages/", $x)) }; } @@ -282,6 +283,7 @@ fn message_parser_test() { // Check that we can use the read interface to stream the contents of // a packet. +#[cfg(feature = "compression-deflate")] #[test] fn message_parser_reader_interface() { use std::io::Read; |