]> git.ipfire.org Git - ipfire.org.git/commitdiff
talk: Show something useful when having an encrypted call
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Oct 2018 18:21:52 +0000 (19:21 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Oct 2018 18:21:52 +0000 (19:21 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/talk.py
src/templates/talk/modules/channels.html

index 5ff48e47f384f525669bf84995b981578f75b53e..7fec3afb425aba1f0431c936b7bbaae8f4408714 100644 (file)
@@ -153,9 +153,20 @@ class Channel(object):
 
                return " ".join(s)
 
+       def is_secure(self):
+               if self.data.secure:
+                       return True
+
+               return False
+
        @property
        def secure(self):
-               return self.data.secure
+               try:
+                       transport_protocol, key_negotiation, cipher_suite = self.data.secure.split(":")
+               except:
+                       return
+
+               return "%s: %s" % (key_negotiation.upper(), cipher_suite.replace("_", "-"))
 
 
 class Talk(Object):
index 9d73d10b1b3a33200191cea961125128d7832748..c2a1959c6449634220ad04c4c3971130661f479a 100644 (file)
                
                                                                <br>
                
-                                                               <span class="text-muted">{{ chan.codec }}</span>
+                                                               <span class="text-muted">
+                                                                       {% if chan.is_secure() %}
+                                                                               <!-- XXX icon lock with title: {{ chan.secure }} -->
+                                                                       {% end %}
 
-                                                               {% if chan.secure %}
-                                                                       <span class="text-muted">{{ chan.secure }}</span>
-                                                               {% end %}
+                                                                       {{ chan.codec }}
+                                                               </span>
                                                        </td>
 
                                                        <td class="text-right">