Fix wrong size being reported for OMEMO encrypted HTTP file transfers

Fixes #630
This commit is contained in:
Marvin W 2019-10-18 21:10:19 +02:00
parent e330e60f83
commit 394862dbd3
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A

View file

@ -35,7 +35,7 @@ public class OmemoFileEncryptor : Dino.FileEncryptor, Object {
omemo_http_file_meta.iv = iv; omemo_http_file_meta.iv = iv;
omemo_http_file_meta.key = key; omemo_http_file_meta.key = key;
omemo_http_file_meta.size = file_transfer.size; omemo_http_file_meta.size = file_transfer.size + 16;
omemo_http_file_meta.mime_type = "omemo"; omemo_http_file_meta.mime_type = "omemo";
file_transfer.input_stream = new ConverterInputStream(file_transfer.input_stream, new SymmetricCipherEncrypter((owned) cipher)); file_transfer.input_stream = new ConverterInputStream(file_transfer.input_stream, new SymmetricCipherEncrypter((owned) cipher));
} catch (Crypto.Error error) { } catch (Crypto.Error error) {