public class KeystoreManager extends java.lang.Object implements IKeystoreManager
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
_rcsid |
protected java.security.KeyStore |
keystore |
protected java.lang.String |
passcode |
| Constructor and Description |
|---|
KeystoreManager(java.lang.String passcode)
Create the keystore object.
|
KeystoreManager(java.lang.String passcode,
java.lang.String base64String)
Create the keystore object from an existing base 64 string.
|
| Modifier and Type | Method and 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.
|
javax.net.ssl.SSLSocketFactory |
getSecureSocketFactory()
Build a secure socket factory based on 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.
|
public static final java.lang.String _rcsid
protected final java.lang.String passcode
protected final java.security.KeyStore keystore
public KeystoreManager(java.lang.String passcode)
throws ManifoldCFException
ManifoldCFExceptionpublic KeystoreManager(java.lang.String passcode,
java.lang.String base64String)
throws ManifoldCFException
ManifoldCFExceptionpublic java.lang.String getHashString()
throws ManifoldCFException
getHashString in interface IKeystoreManagerManifoldCFExceptionpublic java.lang.String[] getContents()
throws ManifoldCFException
getContents in interface IKeystoreManagerManifoldCFExceptionpublic java.lang.String getDescription(java.lang.String alias)
throws ManifoldCFException
getDescription in interface IKeystoreManageralias - is the alias name.ManifoldCFExceptionpublic void importCertificate(java.lang.String alias,
java.io.InputStream certData)
throws ManifoldCFException
importCertificate in interface IKeystoreManageralias - is the name of the certificate.certData - is the binary data for the certificate.ManifoldCFExceptionpublic java.security.cert.Certificate getCertificate(java.lang.String alias)
throws ManifoldCFException
getCertificate in interface IKeystoreManagerManifoldCFExceptionpublic void addCertificate(java.lang.String alias,
java.security.cert.Certificate certificate)
throws ManifoldCFException
addCertificate in interface IKeystoreManagerManifoldCFExceptionpublic void remove(java.lang.String alias)
throws ManifoldCFException
remove in interface IKeystoreManageralias - is the name of the certificate to remove.ManifoldCFExceptionpublic java.lang.String getString()
throws ManifoldCFException
getString in interface IKeystoreManagerManifoldCFExceptionpublic javax.net.ssl.TrustManager[] getTrustManagers()
throws ManifoldCFException
getTrustManagers in interface IKeystoreManagerManifoldCFExceptionpublic javax.net.ssl.SSLSocketFactory getSecureSocketFactory()
throws ManifoldCFException
getSecureSocketFactory in interface ISSLSocketFactoryProducerManifoldCFException