org.apache.commons.ssl
Class TrustChain

java.lang.Object
  extended byorg.apache.commons.ssl.TrustChain
Direct Known Subclasses:
TrustMaterial

public class TrustChain
extends java.lang.Object

Since:
27-Feb-2006
Author:
Credit Union Central of British Columbia, www.cucbc.com, juliusdavies@cucbc.com

Constructor Summary
TrustChain()
           
 
Method Summary
 void addTrustMaterial(TrustChain tc)
           
 boolean contains(TrustChain tc)
           
 boolean contains(java.security.cert.X509Certificate cert)
           
 java.util.SortedSet getCertificates()
           
 int getSize()
           
 java.lang.Object getTrustManagerFactory()
           
 java.lang.Object[] getTrustManagers()
           
 java.security.KeyStore getUnifiedKeyStore()
           
 boolean isEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrustChain

public TrustChain()
Method Detail

getUnifiedKeyStore

public java.security.KeyStore getUnifiedKeyStore()
                                          throws java.security.KeyStoreException,
                                                 java.io.IOException,
                                                 java.security.NoSuchAlgorithmException,
                                                 java.security.cert.CertificateException
Throws:
java.security.KeyStoreException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException

addTrustMaterial

public void addTrustMaterial(TrustChain tc)

contains

public boolean contains(TrustChain tc)

contains

public boolean contains(java.security.cert.X509Certificate cert)
                 throws java.security.KeyStoreException,
                        java.io.IOException,
                        java.security.NoSuchAlgorithmException,
                        java.security.cert.CertificateException
Throws:
java.security.KeyStoreException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException

getTrustManagerFactory

public java.lang.Object getTrustManagerFactory()
                                        throws java.security.NoSuchAlgorithmException,
                                               java.security.KeyStoreException,
                                               java.io.IOException,
                                               java.security.cert.CertificateException
Throws:
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.io.IOException
java.security.cert.CertificateException

getTrustManagers

public java.lang.Object[] getTrustManagers()
                                    throws java.security.NoSuchAlgorithmException,
                                           java.security.KeyStoreException,
                                           java.io.IOException,
                                           java.security.cert.CertificateException
Returns:
Array of TrustManager[] - presumably these will be dropped into a call to SSLContext.init(). Note: returns null if this TrustChain doesn't contain anything to trust.
Throws:
java.security.NoSuchAlgorithmException - serious problems
java.security.KeyStoreException - serious problems
java.io.IOException - serious problems
java.security.cert.CertificateException - serious problems

getCertificates

public java.util.SortedSet getCertificates()
                                    throws java.security.KeyStoreException,
                                           java.io.IOException,
                                           java.security.NoSuchAlgorithmException,
                                           java.security.cert.CertificateException
Returns:
All X509Certificates contained in this TrustChain as a SortedSet. The X509Certificates are sorted based on expiry date.

See org.apache.commons.ssl.Certificates.COMPARE_BY_EXPIRY.

Throws:
java.security.KeyStoreException - serious problems
java.io.IOException - serious problems
java.security.NoSuchAlgorithmException - serious problems
java.security.cert.CertificateException - serious problems

getSize

public int getSize()
            throws java.security.KeyStoreException,
                   java.io.IOException,
                   java.security.NoSuchAlgorithmException,
                   java.security.cert.CertificateException
Returns:
Count of all X509Certificates contained in this TrustChain.
Throws:
java.security.KeyStoreException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException

isEmpty

public boolean isEmpty()
                throws java.security.KeyStoreException,
                       java.io.IOException,
                       java.security.NoSuchAlgorithmException,
                       java.security.cert.CertificateException
Returns:
Count of all X509Certificates contained in this TrustChain.
Throws:
java.security.KeyStoreException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException


Copyright © 2011. All Rights Reserved.