From 685edde308972524c86feea82f74c1a60e650e29 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 2 Jul 2017 18:30:53 +0200 Subject: [PATCH] Don't hardcode "SunX509" as key algorithm in XMPPTCPConnection. Instead use the default algorithm. Fixes SMACK-771. --- .../java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index 67ea8f631..fcb0bac22 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -745,7 +745,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { } if (ks != null) { - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + String keyManagerFactoryAlgorithm = KeyManagerFactory.getDefaultAlgorithm(); + KeyManagerFactory kmf = KeyManagerFactory.getInstance(keyManagerFactoryAlgorithm); try { if (pcb == null) { kmf.init(ks, null);