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
ManifoldCFException
public KeystoreManager(String passcode, String base64String) throws ManifoldCFException
ManifoldCFException
public String getHashString() throws ManifoldCFException
getHashString
in interface IKeystoreManager
ManifoldCFException
public String[] getContents() throws ManifoldCFException
getContents
in interface IKeystoreManager
ManifoldCFException
public String getDescription(String alias) throws ManifoldCFException
getDescription
in interface IKeystoreManager
alias
- is the alias name.ManifoldCFException
public void importCertificate(String alias, InputStream certData) throws ManifoldCFException
importCertificate
in interface IKeystoreManager
alias
- is the name of the certificate.certData
- is the binary data for the certificate.ManifoldCFException
public Certificate getCertificate(String alias) throws ManifoldCFException
getCertificate
in interface IKeystoreManager
ManifoldCFException
public void addCertificate(String alias, Certificate certificate) throws ManifoldCFException
addCertificate
in interface IKeystoreManager
ManifoldCFException
public void remove(String alias) throws ManifoldCFException
remove
in interface IKeystoreManager
alias
- is the name of the certificate to remove.ManifoldCFException
public String getString() throws ManifoldCFException
getString
in interface IKeystoreManager
ManifoldCFException
public SSLSocketFactory getSecureSocketFactory() throws ManifoldCFException
getSecureSocketFactory
in interface IKeystoreManager
ManifoldCFException