org.apache.manifoldcf.core.interfaces
Interface IKeystoreManager

All Known Implementing Classes:
KeystoreManager

public interface IKeystoreManager

This interface describes a class that manages keys and certificates in a secure manner. It's built on top of the JDK 1.4+ JSSE integration, and provides all the necessary logic to work well within the ManifoldCF java environment.


Field Summary
static java.lang.String _rcsid
           
 
Method Summary
 void addCertificate(java.lang.String alias, java.security.cert.Certificate certificate)
          Add a certificate to the keystore.
 java.security.cert.Certificate getCertificate(java.lang.String alias)
          Read a certificate from the keystore.
 java.lang.String[] getContents()
          Grab a list of the aliases in the key store.
 java.lang.String getDescription(java.lang.String alias)
          For an alias, get some descriptive information from the object in the keystore.
 javax.net.ssl.SSLSocketFactory getSecureSocketFactory()
          Build a secure socket factory based on this keystore.
 java.lang.String getString()
          Convert to a base64 string.
 void importCertificate(java.lang.String alias, java.io.InputStream certData)
          Import a certificate or key into the list.
 void remove(java.lang.String alias)
          Remove a certificate.
 

Field Detail

_rcsid

static final java.lang.String _rcsid
See Also:
Constant Field Values
Method Detail

getContents

java.lang.String[] getContents()
                               throws ManifoldCFException
Grab a list of the aliases in the key store.

Returns:
the list, as a string array.
Throws:
ManifoldCFException

getDescription

java.lang.String getDescription(java.lang.String alias)
                                throws ManifoldCFException
For an alias, get some descriptive information from the object in the keystore.

Parameters:
alias - is the alias name.
Returns:
a description of what's in the alias.
Throws:
ManifoldCFException

importCertificate

void importCertificate(java.lang.String alias,
                       java.io.InputStream certData)
                       throws ManifoldCFException
Import a certificate or key into the list. The data must be added as binary.

Parameters:
alias - is the name of the certificate.
certData - is the binary data for the certificate.
Throws:
ManifoldCFException

remove

void remove(java.lang.String alias)
            throws ManifoldCFException
Remove a certificate.

Parameters:
alias - is the name of the certificate to remove.
Throws:
ManifoldCFException

getString

java.lang.String getString()
                           throws ManifoldCFException
Convert to a base64 string.

Returns:
the base64-encoded string.
Throws:
ManifoldCFException

getCertificate

java.security.cert.Certificate getCertificate(java.lang.String alias)
                                              throws ManifoldCFException
Read a certificate from the keystore.

Throws:
ManifoldCFException

addCertificate

void addCertificate(java.lang.String alias,
                    java.security.cert.Certificate certificate)
                    throws ManifoldCFException
Add a certificate to the keystore.

Throws:
ManifoldCFException

getSecureSocketFactory

javax.net.ssl.SSLSocketFactory getSecureSocketFactory()
                                                      throws ManifoldCFException
Build a secure socket factory based on this keystore.

Throws:
ManifoldCFException