From 726e2a4458cdda1ae300785ff545c378474ce3bc Mon Sep 17 00:00:00 2001 From: Ingo Bauersachs Date: Sun, 4 Oct 2015 18:30:08 +0200 Subject: [PATCH] Obtain available SDES ciphers from libjitsi --- .../desktoputil/wizard/SecurityPanel.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/net/java/sip/communicator/plugin/desktoputil/wizard/SecurityPanel.java b/src/net/java/sip/communicator/plugin/desktoputil/wizard/SecurityPanel.java index 87d718ea4..5a0c61e5c 100644 --- a/src/net/java/sip/communicator/plugin/desktoputil/wizard/SecurityPanel.java +++ b/src/net/java/sip/communicator/plugin/desktoputil/wizard/SecurityPanel.java @@ -33,8 +33,6 @@ import org.jitsi.service.neomedia.*; -import ch.imvs.sdes4j.srtp.*; - /** * Contains the security settings for SIP media encryption. * @@ -132,13 +130,15 @@ public void loadData(String ciphers) if(ciphers == null) ciphers = defaultCiphers; - //TODO the available ciphers should come from SDesControlImpl - data.add(new Entry(SrtpCryptoSuite.AES_CM_128_HMAC_SHA1_80, ciphers - .contains(SrtpCryptoSuite.AES_CM_128_HMAC_SHA1_80))); - data.add(new Entry(SrtpCryptoSuite.AES_CM_128_HMAC_SHA1_32, ciphers - .contains(SrtpCryptoSuite.AES_CM_128_HMAC_SHA1_32))); - data.add(new Entry(SrtpCryptoSuite.F8_128_HMAC_SHA1_80, ciphers - .contains(SrtpCryptoSuite.F8_128_HMAC_SHA1_80))); + + MediaService ms = DesktopUtilActivator.getMediaService(); + SDesControl srtp = + (SDesControl) ms.createSrtpControl(SrtpControlType.SDES); + for (String cipher : srtp.getSupportedCryptoSuites()) + { + data.add(new Entry(cipher, ciphers.contains(cipher))); + } + fireTableDataChanged(); }