Browse Source

Don't hardcode "SunX509" as key algorithm

in XMPPTCPConnection. Instead use the default algorithm.

Fixes SMACK-771.
tags/4.2.1
Florian Schmaus 3 years ago
parent
commit
685edde308
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java

+ 2
- 1
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java View File

@@ -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);


Loading…
Cancel
Save