From: Michael Tremer Date: Wed, 10 Oct 2018 18:21:52 +0000 (+0100) Subject: talk: Show something useful when having an encrypted call X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe55357f838d8ff7ef79207c5b5e05a54e171a50;p=ipfire.org.git talk: Show something useful when having an encrypted call Signed-off-by: Michael Tremer --- diff --git a/src/backend/talk.py b/src/backend/talk.py index 5ff48e47..7fec3afb 100644 --- a/src/backend/talk.py +++ b/src/backend/talk.py @@ -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): diff --git a/src/templates/talk/modules/channels.html b/src/templates/talk/modules/channels.html index 9d73d10b..c2a1959c 100644 --- a/src/templates/talk/modules/channels.html +++ b/src/templates/talk/modules/channels.html @@ -39,11 +39,13 @@
- {{ chan.codec }} + + {% if chan.is_secure() %} + + {% end %} - {% if chan.secure %} - {{ chan.secure }} - {% end %} + {{ chan.codec }} +