Linux/MacOSX: use command line values of TrueCryptMode and PRF as defaults for the password dialog

This commit is contained in:
Mounir IDRASSI
2015-01-26 10:14:09 +01:00
parent 3d8d088b06
commit d01fa11983
6 changed files with 33 additions and 9 deletions

View File

@@ -664,6 +664,11 @@ namespace VeraCrypt
MountOptions mountOptions (GetPreferences().DefaultMountOptions);
mountOptions.SlotNumber = SelectedSlotNumber;
mountOptions.Path = GetSelectedVolumePath();
mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode;
if (CmdLine->ArgHash)
{
mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, CmdLine->ArgTrueCryptMode);
}
try
{
@@ -881,6 +886,11 @@ namespace VeraCrypt
SetVolumePath (favorite.Path);
MountOptions mountOptions (GetPreferences().DefaultMountOptions);
mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode;
if (CmdLine->ArgHash)
{
mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, CmdLine->ArgTrueCryptMode);
}
favorite.ToMountOptions (mountOptions);
shared_ptr <VolumeInfo> volume = Gui->MountVolume (mountOptions);