Merge pull request #1757 from 007durgesh219/Issue#1752
Fix K-9 stable: OpenPGP: Unknown compression algorithm #1752
This commit is contained in:
@@ -470,7 +470,13 @@ public class PgpSignEncryptOperation extends BaseOperation {
|
|||||||
InputStream in = new BufferedInputStream(inputData.getInputStream());
|
InputStream in = new BufferedInputStream(inputData.getInputStream());
|
||||||
|
|
||||||
if (enableCompression) {
|
if (enableCompression) {
|
||||||
compressGen = new PGPCompressedDataGenerator(input.getCompressionAlgorithm());
|
// Use preferred compression algo
|
||||||
|
int algo = input.getCompressionAlgorithm();
|
||||||
|
if (algo == PgpSecurityConstants.OpenKeychainCompressionAlgorithmTags.USE_DEFAULT) {
|
||||||
|
algo = PgpSecurityConstants.DEFAULT_COMPRESSION_ALGORITHM;
|
||||||
|
}
|
||||||
|
|
||||||
|
compressGen = new PGPCompressedDataGenerator(algo);
|
||||||
bcpgOut = new BCPGOutputStream(compressGen.open(out));
|
bcpgOut = new BCPGOutputStream(compressGen.open(out));
|
||||||
} else {
|
} else {
|
||||||
bcpgOut = new BCPGOutputStream(out);
|
bcpgOut = new BCPGOutputStream(out);
|
||||||
|
|||||||
Reference in New Issue
Block a user