aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/file_transfer
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-10-28 22:24:04 +0100
committerMarvin W <git@larma.de>2019-10-28 22:38:54 +0100
commit388cc56674487e7b9e339637369fc55f0e271daf (patch)
tree05986624a70c66bd0bd299e910400739fd765338 /plugins/omemo/src/file_transfer
parent0082d376af65b7a9bcb67c9f133884dec6a2006d (diff)
downloaddino-388cc56674487e7b9e339637369fc55f0e271daf.tar.gz
dino-388cc56674487e7b9e339637369fc55f0e271daf.zip
Fix OMEMO file transfer GCM tag
Diffstat (limited to 'plugins/omemo/src/file_transfer')
-rw-r--r--plugins/omemo/src/file_transfer/file_decryptor.vala2
-rw-r--r--plugins/omemo/src/file_transfer/file_encryptor.vala2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/omemo/src/file_transfer/file_decryptor.vala b/plugins/omemo/src/file_transfer/file_decryptor.vala
index d60ecdc8..3999d3b8 100644
--- a/plugins/omemo/src/file_transfer/file_decryptor.vala
+++ b/plugins/omemo/src/file_transfer/file_decryptor.vala
@@ -63,7 +63,7 @@ public class OmemoFileDecryptor : FileDecryptor, Object {
SymmetricCipher cipher = new SymmetricCipher("AES-GCM");
cipher.set_key(key);
cipher.set_iv(iv);
- return new ConverterInputStream(encrypted_stream, new SymmetricCipherDecrypter((owned) cipher));
+ return new ConverterInputStream(encrypted_stream, new SymmetricCipherDecrypter((owned) cipher, 16));
} catch (Crypto.Error e) {
throw new FileReceiveError.DECRYPTION_FAILED("OMEMO file decryption error: %s".printf(e.message));
diff --git a/plugins/omemo/src/file_transfer/file_encryptor.vala b/plugins/omemo/src/file_transfer/file_encryptor.vala
index d7c38736..31c3ad6c 100644
--- a/plugins/omemo/src/file_transfer/file_encryptor.vala
+++ b/plugins/omemo/src/file_transfer/file_encryptor.vala
@@ -37,7 +37,7 @@ public class OmemoFileEncryptor : Dino.FileEncryptor, Object {
omemo_http_file_meta.key = key;
omemo_http_file_meta.size = file_transfer.size + 16;
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, 16));
} catch (Crypto.Error error) {
throw new FileSendError.ENCRYPTION_FAILED("OMEMO file encryption error: %s".printf(error.message));
} catch (GLib.Error error) {