com.digi.config.util
Class HttpsSocketFactory

java.lang.Object
  extended byjavax.net.SocketFactory
      extended byjavax.net.ssl.SSLSocketFactory
          extended bycom.digi.config.util.HttpsSocketFactory
All Implemented Interfaces:
javax.net.ssl.HostnameVerifier

public class HttpsSocketFactory
extends javax.net.ssl.SSLSocketFactory
implements javax.net.ssl.HostnameVerifier

Socket factory required to override trust manager when using HttpsURLConnection classes. This class simply 'decorates' the default socket factory, initializing it with our custom trust manager. The default trust manager throws an exception if a certificate is not in the truststore. Our custom trust manager will prompt the user. Also implements HostnameVerifier to resolve hostname issues.


Constructor Summary
HttpsSocketFactory()
           
 
Method Summary
 java.net.Socket createSocket(java.net.InetAddress inaddr, int i)
           
 java.net.Socket createSocket(java.net.InetAddress inaddr, int i, java.net.InetAddress inaddr1, int j)
           
 java.net.Socket createSocket(java.net.Socket socket, java.lang.String s, int i, boolean flag)
           
 java.net.Socket createSocket(java.lang.String s, int i)
           
 java.net.Socket createSocket(java.lang.String s, int i, java.net.InetAddress inaddr, int j)
           
static javax.net.SocketFactory getDefault()
           
 java.lang.String[] getDefaultCipherSuites()
           
 java.lang.String[] getSupportedCipherSuites()
           
 boolean verify(java.lang.String hostname, javax.net.ssl.SSLSession sess)
           
 
Methods inherited from class javax.net.SocketFactory
createSocket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpsSocketFactory

public HttpsSocketFactory()
Method Detail

getDefault

public static javax.net.SocketFactory getDefault()

createSocket

public java.net.Socket createSocket(java.net.Socket socket,
                                    java.lang.String s,
                                    int i,
                                    boolean flag)
                             throws java.io.IOException
Throws:
java.io.IOException

createSocket

public java.net.Socket createSocket(java.net.InetAddress inaddr,
                                    int i,
                                    java.net.InetAddress inaddr1,
                                    int j)
                             throws java.io.IOException
Throws:
java.io.IOException

createSocket

public java.net.Socket createSocket(java.net.InetAddress inaddr,
                                    int i)
                             throws java.io.IOException
Throws:
java.io.IOException

createSocket

public java.net.Socket createSocket(java.lang.String s,
                                    int i,
                                    java.net.InetAddress inaddr,
                                    int j)
                             throws java.io.IOException
Throws:
java.io.IOException

createSocket

public java.net.Socket createSocket(java.lang.String s,
                                    int i)
                             throws java.io.IOException
Throws:
java.io.IOException

getDefaultCipherSuites

public java.lang.String[] getDefaultCipherSuites()

getSupportedCipherSuites

public java.lang.String[] getSupportedCipherSuites()

verify

public boolean verify(java.lang.String hostname,
                      javax.net.ssl.SSLSession sess)
Specified by:
verify in interface javax.net.ssl.HostnameVerifier


Copyright © 2001-2002 Digi International. All Rights Reserved.