IcedTea-Web
NetX

net.sourceforge.jnlp.security
Class VariableX509TrustManager

java.lang.Object
  extended by com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager
      extended by net.sourceforge.jnlp.security.VariableX509TrustManager
All Implemented Interfaces:
javax.net.ssl.TrustManager, javax.net.ssl.X509TrustManager

public final class VariableX509TrustManager
extends com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager

This class implements an X509 Trust Manager. The certificates it trusts are "variable", in the sense that it can dynamically, and temporarily support different certificates that are not in the keystore.


Constructor Summary
VariableX509TrustManager()
          Constructor initializes the system, user and custom stores
 
Method Summary
 void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
           
 void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, java.lang.String hostName, java.lang.String algorithm)
          Check if client is trusted (no support for custom here, only system/user)
 void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
           
 void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, java.lang.String hostName, boolean checkOnly)
          Check if the server is trusted
 void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, java.lang.String hostName, java.lang.String algorithm)
           
 java.security.cert.X509Certificate[] getAcceptedIssuers()
           
static VariableX509TrustManager getInstance()
          Return an instance of this singleton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableX509TrustManager

public VariableX509TrustManager()
Constructor initializes the system, user and custom stores

Method Detail

checkClientTrusted

public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
                               java.lang.String authType,
                               java.lang.String hostName,
                               java.lang.String algorithm)
                        throws java.security.cert.CertificateException
Check if client is trusted (no support for custom here, only system/user)

Specified by:
checkClientTrusted in class com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager
Throws:
java.security.cert.CertificateException

checkClientTrusted

public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
                               java.lang.String authType)
                        throws java.security.cert.CertificateException
Throws:
java.security.cert.CertificateException

checkServerTrusted

public void checkServerTrusted(java.security.cert.X509Certificate[] chain,
                               java.lang.String authType,
                               java.lang.String hostName,
                               java.lang.String algorithm)
                        throws java.security.cert.CertificateException
Specified by:
checkServerTrusted in class com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager
Throws:
java.security.cert.CertificateException

checkServerTrusted

public void checkServerTrusted(java.security.cert.X509Certificate[] chain,
                               java.lang.String authType)
                        throws java.security.cert.CertificateException
Throws:
java.security.cert.CertificateException

checkServerTrusted

public void checkServerTrusted(java.security.cert.X509Certificate[] chain,
                               java.lang.String authType,
                               java.lang.String hostName,
                               boolean checkOnly)
                        throws java.security.cert.CertificateException
Check if the server is trusted

Parameters:
chain - The cert chain
authType - The auth type algorithm
checkOnly - Whether to "check only" i.e. no user prompt, or to prompt for permission
Throws:
java.security.cert.CertificateException

getAcceptedIssuers

public java.security.cert.X509Certificate[] getAcceptedIssuers()

getInstance

public static VariableX509TrustManager getInstance()
Return an instance of this singleton

Returns:
The instance

IcedTea-Web
NetX

Submit a bug or feature