Methods Summary |
---|
public synchronized java.util.Vector | findKeys(java.lang.String owner)Finds a CAs Public keys based on the distinguished name.
PublicKeyInfo keyInfo;
Vector keys = null;
for (int i = 0; i < keyList.size(); i++) {
keyInfo = (PublicKeyInfo)keyList.elementAt(i);
if (keyInfo.getOwner().compareTo(owner) == 0) {
if (keys == null) {
keys = new Vector();
}
keys.addElement(keyInfo);
}
}
return keys;
|
public synchronized PublicKeyInfo | getKey(int number)Gets a by number from the keystore. 0 is the first key.
return (PublicKeyInfo)keyList.elementAt(number);
|
protected void | initPublicKeyStore(java.util.Vector sharedKeyList)Lets this class work with a writeable key list of a subclass.
This is needed because we cannot make the key list in this
class protected for security reasons. This method will only
work if the PublicKeyStore has not been initialized.
if (keyList != null) {
return;
}
keyList = sharedKeyList;
|
protected void | initPublicKeyStore(java.io.InputStream in, java.util.Vector sharedKeyList)Lets this class work with a writeable key list of a subclass and
initialized that key list from a serialized key list.
This is needed because we cannot make the key list in this
class protected for security reasons. This method will only
work if the PublicKeyStore has not been initialized.
InputStorage storage = new InputStorage(in);
PublicKeyInfo keyInfo;
if (keyList != null) {
return;
}
keyList = sharedKeyList;
for (;;) {
keyInfo = PublicKeyInfo.getKeyFromStorage(storage);
if (keyInfo == null)
return;
keyList.addElement(keyInfo);
}
|
public synchronized int | numberOfKeys()Gets the number of keys in the store.
return keyList.size();
|