mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-26 06:07:59 +01:00
Fixes.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1832 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
b2fa523fcb
commit
5311d5ad17
1 changed files with 13 additions and 7 deletions
|
@ -52,14 +52,20 @@
|
|||
|
||||
package org.jivesoftware.smack;
|
||||
|
||||
import java.io.*;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import com.sun.net.ssl.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.*;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.cert.*;
|
||||
import javax.net.ssl.*;
|
||||
import javax.net.*;
|
||||
import com.sun.net.ssl.*;
|
||||
import javax.net.SocketFactory;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import com.sun.net.ssl.X509TrustManager;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.security.cert.CertificateExpiredException;
|
||||
import java.security.cert.CertificateNotYetValidException;
|
||||
|
||||
|
||||
/**
|
||||
* Creates an SSL connection to a XMPP (Jabber) server.
|
||||
|
@ -101,8 +107,8 @@ public class SSLXMPPConnection extends XMPPConnection {
|
|||
try {
|
||||
SSLContext sslcontent = SSLContext.getInstance("TLS");
|
||||
sslcontent.init(null, // KeyManager not required
|
||||
new TrustManager[] { new DummyTrustManager() },
|
||||
new java.security.SecureRandom());
|
||||
new TrustManager[] { new DummyTrustManager() },
|
||||
new java.security.SecureRandom());
|
||||
factory = sslcontent.getSocketFactory();
|
||||
}
|
||||
catch (NoSuchAlgorithmException e) {
|
||||
|
|
Loading…
Reference in a new issue