aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0384_omemo
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-12-23 00:44:51 +0100
committerfiaxh <git@lightrise.org>2021-12-23 00:46:58 +0100
commitd02c5bc55d4325de308a592e8980139aa0634215 (patch)
tree9cb91f86056dd29f863bd8e54580cccc625af60e /xmpp-vala/src/module/xep/0384_omemo
parent1378224444b1862ac95783ac2bae7d25a0a8862d (diff)
parentf0c7dd0682fec8d72c644d8e54896de7bdc40ddb (diff)
downloaddino-d02c5bc55d4325de308a592e8980139aa0634215.tar.gz
dino-d02c5bc55d4325de308a592e8980139aa0634215.zip
Merge branch groupcalls
Diffstat (limited to 'xmpp-vala/src/module/xep/0384_omemo')
-rw-r--r--xmpp-vala/src/module/xep/0384_omemo/omemo_decryptor.vala15
1 files changed, 12 insertions, 3 deletions
diff --git a/xmpp-vala/src/module/xep/0384_omemo/omemo_decryptor.vala b/xmpp-vala/src/module/xep/0384_omemo/omemo_decryptor.vala
index 8e3213ae..a8ca5016 100644
--- a/xmpp-vala/src/module/xep/0384_omemo/omemo_decryptor.vala
+++ b/xmpp-vala/src/module/xep/0384_omemo/omemo_decryptor.vala
@@ -18,16 +18,25 @@ namespace Xmpp.Xep.Omemo {
ParsedData ret = new ParsedData();
StanzaNode? header_node = encrypted_node.get_subnode("header");
- if (header_node == null) return null;
+ if (header_node == null) {
+ warning("Can't parse OMEMO node: No header node");
+ return null;
+ }
ret.sid = header_node.get_attribute_int("sid", -1);
- if (ret.sid == -1) return null;
+ if (ret.sid == -1) {
+ warning("Can't parse OMEMO node: No sid");
+ return null;
+ }
string? payload_str = encrypted_node.get_deep_string_content("payload");
if (payload_str != null) ret.ciphertext = Base64.decode(payload_str);
string? iv_str = header_node.get_deep_string_content("iv");
- if (iv_str == null) return null;
+ if (iv_str == null) {
+ warning("Can't parse OMEMO node: No iv");
+ return null;
+ }
ret.iv = Base64.decode(iv_str);
foreach (StanzaNode key_node in header_node.get_subnodes("key")) {