org.apache.geronimo.management.geronimo
Interface CertificationAuthority

All Known Implementing Classes:
GeronimoCertificationAuthority

public interface CertificationAuthority

Management interface for dealing with a specific CertificationAuthority.


Method Summary
 Certificate getCertificate()
          This method returns CA's own certificate.
 Certificate getCertificate(BigInteger sNo)
          This method retrieves a certificate with the specified serial number.
 String getCertificateBase64Text(BigInteger sNo)
          This method retrieves a certificate with the specified serial number.
 BigInteger getHighestSerialNumber()
          This method returns the highest serial number used by the CA.
 X500Principal getName()
          This method returns CA's name.
 BigInteger getNextSerialNumber()
          This method returns the next serial number that can be used to issue a certificate and increments the highest serial number.
 boolean isCertificateIssued(BigInteger sNo)
          This method checks if a Certificate with a given serial number is already issued.
 boolean isLocked()
          This method checks if the CA is locked.
 Certificate issueCertificate(X500Principal subject, PublicKey publicKey, BigInteger sNo, Date validFromDate, Date validToDate, String algorithm)
          This method issues a certificate.
 void issueOwnCertificate(BigInteger sNo, Date validFromDate, Date validToDate, String algorithm)
          This method makes the CA issue a self-signed certificate with given details.
 void lock()
          This method locks the CA.
 void unlock(char[] password)
          This method unlocks the CA.
 

Method Detail

isLocked

boolean isLocked()
This method checks if the CA is locked.

Returns:
true if CA is locked, false otherwise.

lock

void lock()
This method locks the CA.


unlock

void unlock(char[] password)
            throws CertificationAuthorityException
This method unlocks the CA.

Parameters:
password - Password to unlock the CA.
Throws:
CertificationAuthorityException

getName

X500Principal getName()
                      throws CertificationAuthorityException
This method returns CA's name.

Throws:
Exception - if CA is locked.
CertificationAuthorityException

getCertificate

Certificate getCertificate()
                           throws CertificationAuthorityException
This method returns CA's own certificate.

Throws:
Exception - if CA is locked.
CertificationAuthorityException

issueOwnCertificate

void issueOwnCertificate(BigInteger sNo,
                         Date validFromDate,
                         Date validToDate,
                         String algorithm)
                         throws CertificationAuthorityException
This method makes the CA issue a self-signed certificate with given details. This method is usually called while initializing the CA.

Parameters:
sNo - Serial number for self-signed certificate
validFromDate - Certificate validity period start date
validToDate - Certificate validity period end date
algorithm - Signature algorithm for self-signed certificate
Throws:
CertificationAuthorityException

issueCertificate

Certificate issueCertificate(X500Principal subject,
                             PublicKey publicKey,
                             BigInteger sNo,
                             Date validFromDate,
                             Date validToDate,
                             String algorithm)
                             throws CertificationAuthorityException
This method issues a certificate.

Parameters:
subject - Subject name
publicKey - Subject's public key
sNo - Serial number for the certificate to be issued
validFromDate - Certificate validity period start date
validToDate - Certificate validity period end date
algorithm - Signature algorithm for the certificate
Returns:
newly issued certificate
Throws:
CertificationAuthorityException

getHighestSerialNumber

BigInteger getHighestSerialNumber()
                                  throws CertificationAuthorityException
This method returns the highest serial number used by the CA.

Throws:
CertificationAuthorityException

isCertificateIssued

boolean isCertificateIssued(BigInteger sNo)
                            throws CertificationAuthorityException
This method checks if a Certificate with a given serial number is already issued.

Parameters:
sNo - The serial number of the the certificate to be looked for
Returns:
true if a certificate with the specified serial number has already been issued
Throws:
CertificationAuthorityException

getNextSerialNumber

BigInteger getNextSerialNumber()
                               throws CertificationAuthorityException
This method returns the next serial number that can be used to issue a certificate and increments the highest serial number.

Throws:
CertificationAuthorityException

getCertificate

Certificate getCertificate(BigInteger sNo)
                           throws CertificationAuthorityException
This method retrieves a certificate with the specified serial number.

Parameters:
sNo - The serial number of the certificate to be retrieved
Returns:
java.security.cert.Certificate instance of the certificate
Throws:
CertificationAuthorityException

getCertificateBase64Text

String getCertificateBase64Text(BigInteger sNo)
                                throws CertificationAuthorityException
This method retrieves a certificate with the specified serial number.

Parameters:
sNo - The serial number of the certificate to be retrieved
Returns:
base64 encoded certificate text
Throws:
CertificationAuthorityException


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.