Fix K-9 stable: OpenPGP: Unknown compression algorithm #1752
Signed-off-by: Durgesh <007durgesh219@gmail.com>
This commit is contained in:
parent
201c38ec02
commit
8b8b91e247
|
@ -470,7 +470,13 @@ public class PgpSignEncryptOperation extends BaseOperation {
|
|||
InputStream in = new BufferedInputStream(inputData.getInputStream());
|
||||
|
||||
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));
|
||||
} else {
|
||||
bcpgOut = new BCPGOutputStream(out);
|
||||
|
|
Loading…
Reference in a new issue