public class KeystoreManager extends Object implements IKeystoreManager
| Modifier and Type | Field and Description |
|---|---|
static String |
_rcsid |
protected KeyStore |
keystore |
protected String |
passcode |
| Constructor and Description |
|---|
KeystoreManager(String passcode)
Create the keystore object.
|
KeystoreManager(String passcode,
String base64String)
Create the keystore object from an existing base 64 string.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCertificate(String alias,
Certificate certificate)
Add a certificate to the keystore.
|
Certificate |
getCertificate(String alias)
Read a certificate from the keystore.
|
String[] |
getContents()
Grab a list of the aliases in the key store.
|
String |
getDescription(String alias)
For an alias, get some descriptive information from the object in the keystore.
|
String |
getHashString()
Get a unique hashstring for this keystore.
|
SSLSocketFactory |
getSecureSocketFactory()
Build a secure socket factory based on this keystore.
|
String |
getString()
Convert to a base64 string.
|
void |
importCertificate(String alias,
InputStream certData)
Import a certificate or key into the list.
|
void |
remove(String alias)
Remove a certificate.
|
public static final String _rcsid
protected final String passcode
protected final KeyStore keystore
public KeystoreManager(String passcode) throws ManifoldCFException
ManifoldCFExceptionpublic KeystoreManager(String passcode, String base64String) throws ManifoldCFException
ManifoldCFExceptionpublic String getHashString() throws ManifoldCFException
getHashString in interface IKeystoreManagerManifoldCFExceptionpublic String[] getContents() throws ManifoldCFException
getContents in interface IKeystoreManagerManifoldCFExceptionpublic String getDescription(String alias) throws ManifoldCFException
getDescription in interface IKeystoreManageralias - is the alias name.ManifoldCFExceptionpublic void importCertificate(String alias, InputStream certData) throws ManifoldCFException
importCertificate in interface IKeystoreManageralias - is the name of the certificate.certData - is the binary data for the certificate.ManifoldCFExceptionpublic Certificate getCertificate(String alias) throws ManifoldCFException
getCertificate in interface IKeystoreManagerManifoldCFExceptionpublic void addCertificate(String alias, Certificate certificate) throws ManifoldCFException
addCertificate in interface IKeystoreManagerManifoldCFExceptionpublic void remove(String alias) throws ManifoldCFException
remove in interface IKeystoreManageralias - is the name of the certificate to remove.ManifoldCFExceptionpublic String getString() throws ManifoldCFException
getString in interface IKeystoreManagerManifoldCFExceptionpublic SSLSocketFactory getSecureSocketFactory() throws ManifoldCFException
getSecureSocketFactory in interface IKeystoreManagerManifoldCFException