org.semanticdesktop.aperture.security.trustmanager.standard
Class RootCertificateStore

java.lang.Object
  extended by org.semanticdesktop.aperture.security.trustmanager.standard.RootCertificateStore
All Implemented Interfaces:
CertificateStore

public class RootCertificateStore
extends Object
implements CertificateStore

A CertificateStore that holds the root Certificates. As this set is not mutable by the application itself, this class only provides functionality to load the certificates from a file.


Constructor Summary
RootCertificateStore(String fileName)
           
 
Method Summary
 void add(Certificate certificate)
          Add a Certificate to this CertificateStore (optional operation).
 boolean contains(Certificate certificate)
          Returns whether this certificate store contains the specified Certificate (optional operation).
 Iterator iterator()
          Returns an Iterator that iterates over all Certificates in this store.
 void load()
          Loads all certificates belonging to this store (optional operation).
 void remove(Certificate certificate)
          Remove a Certificate from this CertificateStore (optional operation);
 void save()
          Saves all certificates belonging to this store (optional operation).
 boolean verify(Certificate certificate)
          Verifies the supplied Certificate against the certificates in this store (optional operation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RootCertificateStore

public RootCertificateStore(String fileName)
Method Detail

load

public void load()
          throws IOException,
                 CertificateException,
                 KeyStoreException,
                 NoSuchAlgorithmException
Description copied from interface: CertificateStore
Loads all certificates belonging to this store (optional operation).

Specified by:
load in interface CertificateStore
Throws:
IOException
CertificateException
KeyStoreException
NoSuchAlgorithmException

save

public void save()
          throws IOException,
                 CertificateException,
                 KeyStoreException,
                 NoSuchAlgorithmException
Description copied from interface: CertificateStore
Saves all certificates belonging to this store (optional operation).

Specified by:
save in interface CertificateStore
Throws:
IOException
CertificateException
KeyStoreException
NoSuchAlgorithmException

add

public void add(Certificate certificate)
         throws KeyStoreException
Description copied from interface: CertificateStore
Add a Certificate to this CertificateStore (optional operation).

Specified by:
add in interface CertificateStore
Parameters:
certificate - The Certificate to add.
Throws:
KeyStoreException

remove

public void remove(Certificate certificate)
            throws KeyStoreException
Description copied from interface: CertificateStore
Remove a Certificate from this CertificateStore (optional operation);

Specified by:
remove in interface CertificateStore
Parameters:
certificate - The Certificate to remove.
Throws:
KeyStoreException

contains

public boolean contains(Certificate certificate)
                 throws KeyStoreException
Description copied from interface: CertificateStore
Returns whether this certificate store contains the specified Certificate (optional operation).

Specified by:
contains in interface CertificateStore
Parameters:
certificate - The Certificate that is tested for presence in this CertificateStore.
Returns:
'true' when this CertificateStore contains the specified Certificate, 'false' otherwise.
Throws:
KeyStoreException

verify

public boolean verify(Certificate certificate)
               throws KeyStoreException
Description copied from interface: CertificateStore
Verifies the supplied Certificate against the certificates in this store (optional operation).

Specified by:
verify in interface CertificateStore
Parameters:
certificate - The Certificate to verify.
Returns:
'true' when the Certificate could successfully be verified, 'false' otherwise.
Throws:
KeyStoreException

iterator

public Iterator iterator()
                  throws KeyStoreException
Description copied from interface: CertificateStore
Returns an Iterator that iterates over all Certificates in this store.

Specified by:
iterator in interface CertificateStore
Returns:
An Iterator returning Certificate instances.
Throws:
KeyStoreException


Copyright © 2010 Aperture Development Team. All Rights Reserved.