[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[equinox-dev] SecureStorage: Can not get the password after system user password has been changed
|
Hello,
I'm using secure storage to store my password. I changed my system password by the prompt that I'm getting from the windows logon screen as a reminder that my password expired. After that, the password can not be read and it can not be stored again. It only occurs on some of my Winodws machines.
I'm thinking about solve the problem by removing the secore_storage file in C:\Documents and Settings\Administrator\.eclipse\org.eclipse.equinox.security when get exception when reading the password. However, there's only one internal method "InternalExchangeUtils.defaultStorageDelete()". I'm not supposed to use that internal method although it did solve the problem.
I also tried to use my own secure_storage file. The code I used to open and delete my secure preference is:
root = SecurePreferencesFactory.open(storeUrl, null);
passwordNode = ibgRoot.node(PASSWORD_NODE);
public static void clearStore() {
{
....
passwordNode.clear();
passwordNode = null;
....
File file = new File(storeUrl.getPath());
file.delete();
}
But still I can't store the password. There'll be a StorageException when:
passwordNode.put(PASSWORD_KEY, password, true);
I think something should have been missed in clearStore(). (maybe close() ?)
Is there any one in the list can help me? Thank you!