- Bug 169353. Prompt user for Desktop Password when Master Password is not present.
This commit is contained in:
24
c_micasad/cache/SecretStore.cs
vendored
24
c_micasad/cache/SecretStore.cs
vendored
@@ -123,7 +123,6 @@ namespace sscs.cache
|
||||
//return true;
|
||||
}
|
||||
|
||||
|
||||
if (sMasterPassword != null)
|
||||
{
|
||||
// verify MasterPassword
|
||||
@@ -136,6 +135,29 @@ namespace sscs.cache
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsDesktopPassword(string sDesktopPassword)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] baPasscode = CASACrypto.GetMasterPasscodeUsingDesktopPasswd(sDesktopPassword, GetPasscodeByDesktopFilePath(), false);
|
||||
if(CASACrypto.ValidatePasscode(baPasscode,GetValidationFilePath()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// try old salt
|
||||
baPasscode = CASACrypto.GetMasterPasscodeUsingDesktopPasswd(sDesktopPassword, GetPasscodeByDesktopFilePath(), true);
|
||||
if(CASACrypto.ValidatePasscode(baPasscode,GetValidationFilePath()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
internal bool StartPersistenceByDesktopPasswd(string desktopPasswd)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user