From 5311d5ad179eb7c226cbdb46e165f5b2ae7e2f33 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Tue, 4 Feb 2003 17:11:17 +0000 Subject: [PATCH] Fixes. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1832 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smack/SSLXMPPConnection.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/source/org/jivesoftware/smack/SSLXMPPConnection.java b/source/org/jivesoftware/smack/SSLXMPPConnection.java index 563bcb894..98d26211d 100644 --- a/source/org/jivesoftware/smack/SSLXMPPConnection.java +++ b/source/org/jivesoftware/smack/SSLXMPPConnection.java @@ -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) {