com.novell.security.japi.pki
Class NPKI_CertChain

java.lang.Object
  |
  +--com.novell.security.japi.pki.NPKI_CertChain

public class NPKI_CertChain
extends java.lang.Object

Certificate chain for use by verifyCertChain.

The certificates in the certificate chain need to be in order, leaf to root.


Constructor Summary
NPKI_CertChain()
          Default Constructor.
 
Method Summary
 void addCertificate(com.novell.security.japi.pki.NPKI_Certificate cert)
          Adds a certificate to the certificate chain.
 com.novell.security.japi.pki.NPKI_Certificate getCertificate(int certNum)
          Retrieves the certificate in the chain at index certNum.
 int getNumberOfCertificates()
          Gets number of certificates in certificate list.
 void removeCertAt(int certNum)
          Removes a certificate from the speicified index.
 boolean removeCertificate(com.novell.security.japi.pki.NPKI_Certificate cert)
          Removes a certificate from the certificate chain.
 int size()
          Gets number of certificates in certificate list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NPKI_CertChain

public NPKI_CertChain()
               throws java.io.IOException
Default Constructor.

Throws:
java.io.IOException - if an I/O exception occurs
Method Detail

addCertificate

public void addCertificate(com.novell.security.japi.pki.NPKI_Certificate cert)
Adds a certificate to the certificate chain.

Parameters:
cert - the certificate to be added.

getCertificate

public com.novell.security.japi.pki.NPKI_Certificate getCertificate(int certNum)
                                                             throws java.lang.ArrayIndexOutOfBoundsException
Retrieves the certificate in the chain at index certNum.

Parameters:
certNum - The index of the desired certificate.
Returns:
the NPKI_Certificate structure (certificate) in the chain at index certNum.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if certNum is greater than the actual number of certificates in the list.

removeCertificate

public boolean removeCertificate(com.novell.security.japi.pki.NPKI_Certificate cert)
Removes a certificate from the certificate chain.

Parameters:
cert - The certificate to be removed.
Returns:
true if the certificate was removed.

removeCertAt

public void removeCertAt(int certNum)
                  throws java.lang.ArrayIndexOutOfBoundsException
Removes a certificate from the speicified index.

Parameters:
certNum - The index of the certificate to be removed.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if certNum is greater than the actual number of certificate in the list.

getNumberOfCertificates

public int getNumberOfCertificates()
Gets number of certificates in certificate list.

Returns:
the number of certificates in the certificate list.

size

public int size()
Gets number of certificates in certificate list.

Returns:
the number of certificates in the certificate list.