Fix OMEMO file transfer GCM tag

This commit is contained in:
Marvin W 2019-10-28 22:24:04 +01:00
parent 0082d376af
commit 388cc56674
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
2 changed files with 2 additions and 2 deletions

View file

@ -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));

View file

@ -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) {