Disable padding support.
- Our method of padding messages is not universally supported by consuming implementations: https://tests.sequoia-pgp.org/#Packet_excess_consumption - Disable it for now. Once we support generating v6 OpenPGP messages, we can enable it again with the new padding packet.
This commit is contained in:
parent
3983d42953
commit
0499e25675
@ -172,7 +172,7 @@ pub struct Command {
|
||||
#[clap(
|
||||
long = "compression",
|
||||
value_name = "KIND",
|
||||
default_value_t = CompressionMode::Pad,
|
||||
default_value_t = CompressionMode::None,
|
||||
help = "Selects compression scheme to use",
|
||||
value_enum,
|
||||
)]
|
||||
@ -198,6 +198,7 @@ pub enum EncryptionMode {
|
||||
#[derive(ValueEnum, Debug, Clone)]
|
||||
pub enum CompressionMode {
|
||||
None,
|
||||
#[cfg(all(unix, not(unix)))] // Bottom, but: `cfg` predicate key cannot be a literal
|
||||
Pad,
|
||||
Zip,
|
||||
Zlib,
|
||||
|
@ -16,6 +16,7 @@ use openpgp::serialize::stream::LiteralWriter;
|
||||
use openpgp::serialize::stream::Message;
|
||||
use openpgp::serialize::stream::Recipient;
|
||||
use openpgp::serialize::stream::Signer;
|
||||
#[cfg(all(unix, not(unix)))] // Bottom, but: `cfg` predicate key cannot be a literal
|
||||
use openpgp::serialize::stream::padding::Padder;
|
||||
use openpgp::types::CompressionAlgorithm;
|
||||
use openpgp::types::KeyFlags;
|
||||
@ -186,6 +187,7 @@ pub fn encrypt<'a, 'b: 'a>(
|
||||
|
||||
match compression {
|
||||
CompressionMode::None => (),
|
||||
#[cfg(all(unix, not(unix)))] // Bottom, but: `cfg` predicate key cannot be a literal
|
||||
CompressionMode::Pad => sink = Padder::new(sink).build()?,
|
||||
CompressionMode::Zip => sink =
|
||||
Compressor::new(sink).algo(CompressionAlgorithm::Zip).build()?,
|
||||
|
Loading…
Reference in New Issue
Block a user