//We only want to make these calls if the Nss database already exists;
//otherwise, this will cause an NSS database to be created
//potentially with a bad master password (i.e. a master password which
//is different that that of the NSS database in the domain). This
//results in an unusable Node Agent.
NssStore nssStore = NssStore.getInstance(
nssDb.getParentFile().getAbsolutePath(),
false, getMasterPasswordClear(config));
String[] result = nssStore.getTokenNamesAsArray();
//We must explicitly close the NSS database so that it is not in use during
//synchronization of the Node Agent.
NssStore.closeInstance();
return result;