diff options
author | Sam Whited <sam@samwhited.com> | 2015-01-14 12:20:02 -0500 |
---|---|---|
committer | Sam Whited <sam@samwhited.com> | 2015-01-14 13:10:15 -0500 |
commit | 548a585b2c4af9b4c2a98faabb8855fcb260daf2 (patch) | |
tree | afde87c24c6e0d543b30e77c5d347b60e5a45515 /src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | |
parent | a88824bb1d40f1373b22639815ed673c134f6777 (diff) |
Harden the TLS connection cipher suites
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 30437575..6424b1d5 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -53,6 +53,7 @@ import eu.siacs.conversations.crypto.sasl.ScramSha1; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.generator.IqGenerator; import eu.siacs.conversations.services.XmppConnectionService; +import eu.siacs.conversations.utils.CryptoHelper; import eu.siacs.conversations.utils.DNSHelper; import eu.siacs.conversations.utils.Xmlns; import eu.siacs.conversations.xml.Element; @@ -514,6 +515,12 @@ public class XmppConnection implements Runnable { supportedProtocols.remove("SSLv3"); supportProtocols = new String[supportedProtocols.size()]; supportedProtocols.toArray(supportProtocols); + + final String[] cipherSuites = CryptoHelper.getSupportedCipherSuites( + sslSocket.getSupportedCipherSuites()); + if (cipherSuites.length > 0) { + sslSocket.setEnabledCipherSuites(cipherSuites); + } } sslSocket.setEnabledProtocols(supportProtocols); |