1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-24 03:27:59 +01:00
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1832 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-02-04 17:11:17 +00:00 committed by mtucker
parent b2fa523fcb
commit 5311d5ad17

View file

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