diff options
author | fiaxh <git@lightrise.org> | 2021-04-30 21:37:02 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-05-01 22:57:38 +0200 |
commit | 0ad968df367f5a44c568329834115018866ff8b9 (patch) | |
tree | 72b1594207656ad6e87bb03aa3658a3e9309c5d0 /plugins/ice/src/transport_parameters.vala | |
parent | 7d2e64769067c1b47e0500f6456dd7e6f4eb435a (diff) | |
download | dino-0ad968df367f5a44c568329834115018866ff8b9.tar.gz dino-0ad968df367f5a44c568329834115018866ff8b9.zip |
Use the same DTLS fingerprint in all contents. Display audio+video enc keys in UI if they differ.
Diffstat (limited to 'plugins/ice/src/transport_parameters.vala')
-rw-r--r-- | plugins/ice/src/transport_parameters.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/ice/src/transport_parameters.vala b/plugins/ice/src/transport_parameters.vala index 38652952..62c04906 100644 --- a/plugins/ice/src/transport_parameters.vala +++ b/plugins/ice/src/transport_parameters.vala @@ -60,13 +60,13 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport } } - public TransportParameters(Nice.Agent agent, Xep.ExternalServiceDiscovery.Service? turn_service, string? turn_ip, uint8 components, Jid local_full_jid, Jid peer_full_jid, StanzaNode? node = null) { + public TransportParameters(Nice.Agent agent, DtlsSrtp.CredentialsCapsule? credentials, Xep.ExternalServiceDiscovery.Service? turn_service, string? turn_ip, uint8 components, Jid local_full_jid, Jid peer_full_jid, StanzaNode? node = null) { base(components, local_full_jid, peer_full_jid, node); this.we_want_connection = (node == null); this.agent = agent; if (this.peer_fingerprint != null || !incoming) { - dtls_srtp_handler = setup_dtls(this); + dtls_srtp_handler = setup_dtls(this, credentials); own_fingerprint = dtls_srtp_handler.own_fingerprint; if (incoming) { own_setup = "active"; @@ -113,9 +113,9 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport agent.gather_candidates(stream_id); } - private static DtlsSrtp.Handler setup_dtls(TransportParameters tp) { + private static DtlsSrtp.Handler setup_dtls(TransportParameters tp, DtlsSrtp.CredentialsCapsule credentials) { var weak_self = WeakRef(tp); - DtlsSrtp.Handler dtls_srtp = DtlsSrtp.setup(); + DtlsSrtp.Handler dtls_srtp = new DtlsSrtp.Handler.with_cert(credentials); dtls_srtp.send_data.connect((data) => { TransportParameters self = (TransportParameters) weak_self.get(); if (self != null) self.agent.send(self.stream_id, 1, data); |