|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.membership.pse.PSEConfig
Manages the state of a Personal Security Enviroment.
Constructor Summary | |
PSEConfig(KeyStoreManager storeManager,
char[] password)
Standard constructor. |
Method Summary | |
void |
erase()
Remove an existing PSE enviroment. |
void |
erase(ID id)
Erases the specified id from the keystore. |
protected void |
finalize()
|
PrivateKey |
getKey(ID id,
char[] key_password)
Returns the private key for the specified ID. |
ID[] |
getKeysList()
Returns the list of root certificates for which there is an associated local private key. |
(package private) ID[] |
getKeysList(char[] store_password)
Returns the list of root certificates for which there is an associated local private key. |
KeyStore |
getKeyStore()
Gets a copy of the keystore associated with this PSE instance. |
X509Certificate |
getTrustedCertificate(ID id)
Returns the trusted cert for the specified id. |
(package private) X509Certificate |
getTrustedCertificate(ID id,
char[] store_password)
Returns the trusted cert for the specified id. |
X509Certificate[] |
getTrustedCertificateChain(ID id)
Returns the trusted cert chain for the specified id. |
ID |
getTrustedCertificateID(X509Certificate cert)
Returns the ID of the provided certificate or null if the certificate is not found in the keystore. |
ID[] |
getTrustedCertsList()
Returns the list of the trusted certificates available in this keystore. |
void |
initialize()
Create a new PSE enviroment. |
boolean |
isInitialized()
Returns true if the PSE needs to be configured before it can be used. |
void |
setKey(ID id,
Certificate[] certchain,
PrivateKey key,
char[] key_password)
Adds a key to the pse keystore. |
void |
setKeyStorePassword(char[] store_password)
Sets the password to be used when unlocking the keystore. |
void |
setTrustedCertificate(ID id,
X509Certificate cert)
Adds a trusted certificate with the specified id to the key store. |
(package private) boolean |
validPasswd(ID id,
char[] store_password,
char[] key_password)
Check if the provided passwords are correct for the specified identity. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PSEConfig(KeyStoreManager storeManager, char[] password)
Method Detail |
public final void setKeyStorePassword(char[] store_password)
protected void finalize() throws Throwable
Throwable
public boolean isInitialized()
public void initialize() throws KeyStoreException, IOException
KeyStoreException
- When the wrong keystore has been provided.
IOException
- For errors related to processing the keystore.public void erase() throws IOException
IOException
public KeyStore getKeyStore()
boolean validPasswd(ID id, char[] store_password, char[] key_password)
store_password
- The password used to unlock the keystore.key_password
- The password used to unlock the individual key.
true
if the passwords were valid for the given id
otherwise false.public ID[] getTrustedCertsList() throws KeyStoreException, IOException
KeyStoreException
- When the wrong keystore has been provided.
IOException
- For errors related to processing the keystore.public ID[] getKeysList() throws KeyStoreException, IOException
KeyStoreException
IOException
ID[] getKeysList(char[] store_password) throws KeyStoreException, IOException
store_password
- The password used to unlock the keystore.
KeyStoreException
IOException
public ID getTrustedCertificateID(X509Certificate cert) throws KeyStoreException, IOException
KeyStoreException
IOException
public X509Certificate getTrustedCertificate(ID id) throws KeyStoreException, IOException
KeyStoreException
IOException
X509Certificate getTrustedCertificate(ID id, char[] store_password) throws KeyStoreException, IOException
KeyStoreException
IOException
public X509Certificate[] getTrustedCertificateChain(ID id) throws KeyStoreException, IOException
KeyStoreException
IOException
public PrivateKey getKey(ID id, char[] key_password) throws KeyStoreException, IOException
KeyStoreException
IOException
public void setTrustedCertificate(ID id, X509Certificate cert) throws KeyStoreException, IOException
KeyStoreException
IOException
public void setKey(ID id, Certificate[] certchain, PrivateKey key, char[] key_password) throws KeyStoreException, IOException
KeyStoreException
IOException
public void erase(ID id) throws KeyStoreException, IOException
KeyStoreException
IOException
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |