Alpha code for Secret Persistence Policy. In Progress.
This commit is contained in:
parent
b7c2fc8b7c
commit
48fd98dedb
11
CASA/micasad/cache/SecretStore.cs
vendored
11
CASA/micasad/cache/SecretStore.cs
vendored
@ -181,6 +181,15 @@ namespace sscs.cache
|
||||
{
|
||||
CSSSLogger.DbgLog("StartPersistenceByDesktopPasswd - Called");
|
||||
|
||||
UIPol uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL, GetUserHomeDirectory());
|
||||
string sShouldUseDesktop = uiPolicy.GetConfigSetting(ConstStrings.CONFIG_DECRYPT_USING_DESKTOP_PASS);
|
||||
|
||||
if ((sShouldUseDesktop != null) && (sShouldUseDesktop.Equals("0")))
|
||||
{
|
||||
CSSSLogger.DbgLog("Policy set: Did not start persistent by Desktop Password");
|
||||
return false;
|
||||
}
|
||||
|
||||
// make sure we have a Persistence Directory
|
||||
if (GetPersistenceDirectory() == null || GetPersistenceDirectory().Length < 1)
|
||||
{
|
||||
@ -797,7 +806,7 @@ namespace sscs.cache
|
||||
// the user might have set a different one
|
||||
// load the policy file and check.
|
||||
UIPol uiPolicy = (UIPol)ICASAPol.GetPolicy(CASAPolType.UI_POL, GetUserHomeDirectory());
|
||||
string sDir = uiPolicy.GetConfigSetting("PersistentDirectory");
|
||||
string sDir = uiPolicy.GetConfigSetting(ConstStrings.CONFIG_PERSISTENT_DIRECTORY);
|
||||
if ((sDir != null) && (sDir.Length > 0))
|
||||
{
|
||||
m_persistenceDirectory = sDir;
|
||||
|
@ -120,6 +120,11 @@ namespace sscs.constants
|
||||
|
||||
internal static string MICASA_VALIDATION_STRING = "miCASAValidationString";
|
||||
|
||||
// these are used in the GUI too.
|
||||
internal static string CONFIG_PERSISTENT_DIRECTORY = "PersistentDirectory";
|
||||
internal static string CONFIG_PERSIST_SECRETS = "PersistSecrets";
|
||||
internal static string CONFIG_DECRYPT_USING_DESKTOP_PASS = "DecryptUsingDesktopPassword";
|
||||
|
||||
}
|
||||
|
||||
internal class ConstFlags
|
||||
|
Loading…
Reference in New Issue
Block a user