Interface IKeystoreManager
-
- All Superinterfaces:
ISSLSocketFactoryProducer
- All Known Implementing Classes:
KeystoreManager
public interface IKeystoreManager extends ISSLSocketFactoryProducer
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
Fields Modifier and Type Field Description static java.lang.String
_rcsid
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.java.lang.String
getHashString()
Get a unique hashstring for this keystore.java.lang.String
getString()
Convert to a base64 string.javax.net.ssl.TrustManager[]
getTrustManagers()
Get the trust stores for this keystore manager.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.-
Methods inherited from interface org.apache.manifoldcf.core.interfaces.ISSLSocketFactoryProducer
getSecureSocketFactory
-
-
-
-
Field Detail
-
_rcsid
static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHashString
java.lang.String getHashString() throws ManifoldCFException
Get a unique hashstring for this keystore. The hashcode depends only on the certificates in the store.- Returns:
- the hash string for this keystore.
- Throws:
ManifoldCFException
-
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. This differs every time it is called, and thus CANNOT be used for hashing.
- 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
-
getTrustManagers
javax.net.ssl.TrustManager[] getTrustManagers() throws ManifoldCFException
Get the trust stores for this keystore manager.- Throws:
ManifoldCFException
-
-