diff options
author | fiaxh <git@lightrise.org> | 2021-10-12 17:07:59 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-10-12 19:43:57 +0200 |
commit | 9285fd07bf555fdf46954c4adfa58751e44633a3 (patch) | |
tree | 6134c010f221e1505579d6031a1e1b1e1c28f23f /plugins | |
parent | 237081e5735b463b7528f4f3f52978eaf1bfeeca (diff) | |
download | dino-9285fd07bf555fdf46954c4adfa58751e44633a3.tar.gz dino-9285fd07bf555fdf46954c4adfa58751e44633a3.zip |
Fix compiler warnings ('Type `uint8[]' can not be used for a GLib.Object property')
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ice/src/dtls_srtp.vala | 2 | ||||
-rw-r--r-- | plugins/omemo/src/dtls_srtp_verification_draft.vala | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/plugins/ice/src/dtls_srtp.vala b/plugins/ice/src/dtls_srtp.vala index 0254351d..ca398e69 100644 --- a/plugins/ice/src/dtls_srtp.vala +++ b/plugins/ice/src/dtls_srtp.vala @@ -211,7 +211,7 @@ public class Handler { srtp_session.set_encryption_key(Crypto.Srtp.AES_CM_128_HMAC_SHA1_80, client_key.extract(), client_salt.extract()); srtp_session.set_decryption_key(Crypto.Srtp.AES_CM_128_HMAC_SHA1_80, server_key.extract(), server_salt.extract()); } - return new Xmpp.Xep.Jingle.ContentEncryption() { encryption_ns=Xmpp.Xep.JingleIceUdp.DTLS_NS_URI, encryption_name = "DTLS-SRTP", our_key=credentials.own_fingerprint, peer_key=peer_fingerprint }; + return new Xmpp.Xep.Jingle.ContentEncryption(Xmpp.Xep.JingleIceUdp.DTLS_NS_URI, "DTLS-SRTP", credentials.own_fingerprint, peer_fingerprint); } private static ssize_t pull_function(void* transport_ptr, uint8[] buffer) { diff --git a/plugins/omemo/src/dtls_srtp_verification_draft.vala b/plugins/omemo/src/dtls_srtp_verification_draft.vala index 810092c3..0cb08696 100644 --- a/plugins/omemo/src/dtls_srtp_verification_draft.vala +++ b/plugins/omemo/src/dtls_srtp_verification_draft.vala @@ -66,7 +66,7 @@ namespace Dino.Plugins.Omemo.DtlsSrtpVerificationDraft { stream.get_flag(Xep.Jingle.Flag.IDENTITY).get_session.begin(jingle_sid, (_, res) => { Xep.Jingle.Session? session = stream.get_flag(Xep.Jingle.Flag.IDENTITY).get_session.end(res); if (session == null || !session.contents_map.has_key(content_name)) return; - var encryption = new OmemoContentEncryption() { encryption_ns=NS_URI, encryption_name="OMEMO", our_key=new uint8[0], peer_key=new uint8[0], sid=device_id_by_jingle_sid[jingle_sid], jid=iq.from.bare_jid }; + var encryption = new OmemoContentEncryption(NS_URI, "OMEMO", iq.from.bare_jid, device_id_by_jingle_sid[jingle_sid]); session.contents_map[content_name].encryptions[NS_URI] = encryption; if (iq.stanza.get_deep_attribute(Xep.Jingle.NS_URI + ":jingle", "action") == "session-accept") { @@ -143,7 +143,7 @@ namespace Dino.Plugins.Omemo.DtlsSrtpVerificationDraft { private void on_content_add_received(XmppStream stream, Xep.Jingle.Content content) { if (!content_names_by_jingle_sid.has_key(content.session.sid) || content_names_by_jingle_sid[content.session.sid].contains(content.content_name)) { - var encryption = new OmemoContentEncryption() { encryption_ns=NS_URI, encryption_name="OMEMO", our_key=new uint8[0], peer_key=new uint8[0], sid=device_id_by_jingle_sid[content.session.sid], jid=content.peer_full_jid.bare_jid }; + var encryption = new OmemoContentEncryption(NS_URI, "OMEMO", content.peer_full_jid.bare_jid, device_id_by_jingle_sid[content.session.sid]); content.encryptions[encryption.encryption_ns] = encryption; } } @@ -190,6 +190,12 @@ namespace Dino.Plugins.Omemo.DtlsSrtpVerificationDraft { public class OmemoContentEncryption : Xep.Jingle.ContentEncryption { public Jid jid { get; set; } public int sid { get; set; } + + public OmemoContentEncryption(string encryption_ns, string encryption_name, Jid jid, int sid) { + base(encryption_ns, encryption_name); + this.jid = jid; + this.sid = sid; + } } } |