com.digi.config.util
Class HttpsTrustManager

java.lang.Object
  extended bycom.digi.config.util.HttpsTrustManager
All Implemented Interfaces:
javax.net.ssl.TrustManager, javax.net.ssl.X509TrustManager

public class HttpsTrustManager
extends java.lang.Object
implements javax.net.ssl.X509TrustManager

Implements a trust manager that prompts the user when an unknown certificate is received. Uses the default sun trust manager for most of the work. NOTE: when running as an applet this isn't required because the Java Plug-In handles this. When running as an application, however, the default action of the underlying HTTPS support is to close the connection if the certificate is not trusted (without prompting the user). This implementation is currently very simplistic because we use application version for internal development and test only.


Field Summary
(package private)  java.security.KeyStore keyStore
           
(package private)  javax.net.ssl.X509TrustManager sunX509TrustManager
           
 
Constructor Summary
HttpsTrustManager()
           
 
Method Summary
 void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
           
 void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
           
 java.security.cert.X509Certificate[] getAcceptedIssuers()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keyStore

java.security.KeyStore keyStore

sunX509TrustManager

javax.net.ssl.X509TrustManager sunX509TrustManager
Constructor Detail

HttpsTrustManager

public HttpsTrustManager()
Method Detail

checkClientTrusted

public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
                               java.lang.String authType)
                        throws java.security.cert.CertificateException
Specified by:
checkClientTrusted in interface javax.net.ssl.X509TrustManager
Throws:
java.security.cert.CertificateException

checkServerTrusted

public void checkServerTrusted(java.security.cert.X509Certificate[] chain,
                               java.lang.String authType)
                        throws java.security.cert.CertificateException
Specified by:
checkServerTrusted in interface javax.net.ssl.X509TrustManager
Throws:
java.security.cert.CertificateException

getAcceptedIssuers

public java.security.cert.X509Certificate[] getAcceptedIssuers()
Specified by:
getAcceptedIssuers in interface javax.net.ssl.X509TrustManager


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