aboutsummaryrefslogtreecommitdiff
path: root/plugins/signal-protocol/src/signal_helper.c
diff options
context:
space:
mode:
authorTim Henkes <tim.henkes@student.hs-rm.de>2018-11-18 16:52:57 +0100
committerMarvin W <git@larma.de>2018-11-20 08:07:28 -0600
commit7497f1f17b941c09f84e6e4c6a5979e9c9b79851 (patch)
tree2e47f5e0e8fc01765dd3e735ddc43953b7ccc01b /plugins/signal-protocol/src/signal_helper.c
parente9535ab6b87f051beb8a70147cee0b98b02459eb (diff)
downloaddino-7497f1f17b941c09f84e6e4c6a5979e9c9b79851.tar.gz
dino-7497f1f17b941c09f84e6e4c6a5979e9c9b79851.zip
Allow 12 for the size of the IV
Diffstat (limited to 'plugins/signal-protocol/src/signal_helper.c')
-rw-r--r--plugins/signal-protocol/src/signal_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/signal-protocol/src/signal_helper.c b/plugins/signal-protocol/src/signal_helper.c
index 7de934e9..91fcefbd 100644
--- a/plugins/signal-protocol/src/signal_helper.c
+++ b/plugins/signal-protocol/src/signal_helper.c
@@ -222,7 +222,7 @@ int signal_vala_encrypt(signal_buffer **output,
int algo, mode;
if (aes_cipher(cipher, key_len, &algo, &mode)) return SG_ERR_UNKNOWN;
- if (iv_len != 16) return SG_ERR_UNKNOWN;
+ if (iv_len != 16 && iv_len != 12) return SG_ERR_UNKNOWN;
gcry_cipher_hd_t ctx = {0};
@@ -283,7 +283,7 @@ int signal_vala_decrypt(signal_buffer **output,
if (aes_cipher(cipher, key_len, &algo, &mode)) return SG_ERR_UNKNOWN;
if (ciphertext_len == 0) return SG_ERR_UNKNOWN;
- if (iv_len != 16) return SG_ERR_UNKNOWN;
+ if (iv_len != 16 && iv_len != 12) return SG_ERR_UNKNOWN;
gcry_cipher_hd_t ctx = {0};