diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-01-14 22:25:28 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-01-14 22:25:28 +0100 |
commit | df742ce1e12d9909a0b1777a839e012a6dcdc78b (patch) | |
tree | afde87c24c6e0d543b30e77c5d347b60e5a45515 /src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | |
parent | a88824bb1d40f1373b22639815ed673c134f6777 (diff) | |
parent | 548a585b2c4af9b4c2a98faabb8855fcb260daf2 (diff) |
Merge pull request #883 from SamWhited/ciphers
Harden TLS 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); |