mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 04:42:06 +01:00
Change default compression algorithm from UNCOMPRESSED to ZIP
This commit is contained in:
parent
f68779d8a5
commit
e5ae09b79c
2 changed files with 7 additions and 1 deletions
|
@ -379,7 +379,7 @@ public final class Policy {
|
|||
}
|
||||
|
||||
public static CompressionAlgorithmPolicy defaultCompressionAlgorithmPolicy() {
|
||||
return new CompressionAlgorithmPolicy(CompressionAlgorithm.UNCOMPRESSED, Arrays.asList(
|
||||
return new CompressionAlgorithmPolicy(CompressionAlgorithm.ZIP, Arrays.asList(
|
||||
CompressionAlgorithm.UNCOMPRESSED,
|
||||
CompressionAlgorithm.ZIP,
|
||||
CompressionAlgorithm.BZIP2,
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.nio.charset.StandardCharsets;
|
|||
import java.security.InvalidAlgorithmParameterException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
import org.bouncycastle.openpgp.PGPCompressedData;
|
||||
import org.bouncycastle.openpgp.PGPEncryptedData;
|
||||
import org.bouncycastle.openpgp.PGPEncryptedDataList;
|
||||
import org.bouncycastle.openpgp.PGPException;
|
||||
|
@ -115,6 +116,11 @@ public class OnePassSignatureBracketingTest {
|
|||
} else if (next instanceof PGPOnePassSignatureList) {
|
||||
onePassSignatures = (PGPOnePassSignatureList) next;
|
||||
continue outerloop;
|
||||
} else if (next instanceof PGPCompressedData) {
|
||||
PGPCompressedData compressed = (PGPCompressedData) next;
|
||||
InputStream decompressor = compressed.getDataStream();
|
||||
objectFactory = new PGPObjectFactory(decompressor, ImplementationFactory.getInstance().getKeyFingerprintCalculator());
|
||||
continue outerloop;
|
||||
} else if (next instanceof PGPLiteralData) {
|
||||
continue outerloop;
|
||||
} else if (next instanceof PGPSignatureList) {
|
||||
|
|
Loading…
Reference in a new issue