ice.ssl
Class ServerCertificateList

java.lang.Object
  extended byice.ssl.ServerCertificateList
All Implemented Interfaces:
Cloneable

public class ServerCertificateList
extends Object
implements Cloneable

This class represent a list of server certificates. A server certificate is a certificate for which the private key is unknown. It provides facilities to store the list in a secure way, and add and remove certificates from the list. This class can be instanciated directly or using the static method restoreList. For instanciating a list from a previously saved list do:

ServerCertificateList scl = ServerCertificateList.restoreList(in);
For creating a new empty list do:
ServerCertificateList scl = new ServerCertificateList();

Since:
ICEsecure 1.1
Author:
Jerome Bugnet
See Also:
X509CertificateFactory, X509Certificate

Constructor Summary
ServerCertificateList()
          Creates an empty list.
 
Method Summary
 void addCertificate(X509Certificate cert)
          Adds a new certificate in the list.
 Object clone()
          Clones this certificate list
 Enumeration getList()
          Obtains the list of certificates stored in this object.
 void removeCertificate(X509Certificate cert)
          Removes a certificate from the list.
static ServerCertificateList restoreList(InputStream in)
          Retrieves a previously saved certificate list.
static ServerCertificateList restoreListFromPEM(InputStream in)
           
 void save(OutputStream out)
          Saves this certificate list.
 void saveAsPEM(OutputStream out)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerCertificateList

public ServerCertificateList()
Creates an empty list.

Method Detail

addCertificate

public void addCertificate(X509Certificate cert)
Adds a new certificate in the list.


removeCertificate

public void removeCertificate(X509Certificate cert)
Removes a certificate from the list.


getList

public Enumeration getList()
Obtains the list of certificates stored in this object.


restoreList

public static ServerCertificateList restoreList(InputStream in)
                                         throws IOException
Retrieves a previously saved certificate list.

Returns:
a newly created ServerCertificateList obtained from the stream
Throws:
IOException

save

public void save(OutputStream out)
          throws IOException
Saves this certificate list.

Throws:
IOException

clone

public Object clone()
Clones this certificate list


restoreListFromPEM

public static ServerCertificateList restoreListFromPEM(InputStream in)
                                                throws IOException
Throws:
IOException

saveAsPEM

public void saveAsPEM(OutputStream out)
               throws IOException
Throws:
IOException