diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-07-24 08:48:52 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-07-24 08:48:52 +0200 |
commit | 3f976c24d2c991f8634991371cbb99662f979022 (patch) | |
tree | b2e6af95be6cb091506c8ba0a1f2230a493fa742 /src/Main/Forms/MountOptionsDialog.cpp | |
parent | ba74b9d5b84c9e8ce692489985ae331386359cb0 (diff) | |
download | VeraCrypt-3f976c24d2c991f8634991371cbb99662f979022.tar.gz VeraCrypt-3f976c24d2c991f8634991371cbb99662f979022.zip |
Linux/macOS: Remove TrueCrypt support
Diffstat (limited to 'src/Main/Forms/MountOptionsDialog.cpp')
-rw-r--r-- | src/Main/Forms/MountOptionsDialog.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/Main/Forms/MountOptionsDialog.cpp b/src/Main/Forms/MountOptionsDialog.cpp index 4b8f7ce5..85a06d1e 100644 --- a/src/Main/Forms/MountOptionsDialog.cpp +++ b/src/Main/Forms/MountOptionsDialog.cpp @@ -50,14 +50,8 @@ namespace VeraCrypt GraphicUserInterface::InstallPasswordEntryCustomKeyboardShortcuts (this); #endif - PasswordPanel = new VolumePasswordPanel (this, &options, options.Password, disableMountOptions, options.Keyfiles, !disableMountOptions, true, true, false, true, true); + PasswordPanel = new VolumePasswordPanel (this, &options, options.Password, options.Keyfiles, !disableMountOptions, true, true, false, true, true); PasswordPanel->SetCacheCheckBoxValidator (wxGenericValidator (&Options.CachePassword)); - - if (options.Path && options.Path->HasTrueCryptExtension() && !disableMountOptions - && !options.TrueCryptMode && (options.Pim <= 0)) - { - PasswordPanel->SetTrueCryptMode (true); - } PasswordSizer->Add (PasswordPanel, 1, wxALL | wxEXPAND); @@ -88,7 +82,7 @@ namespace VeraCrypt OptionsButton->SetLabel (OptionsButtonLabel + L" >"); OptionsPanel->Show (false); - ProtectionPasswordPanel = new VolumePasswordPanel (ProtectionSizer->GetStaticBox(), &options, options.ProtectionPassword, true, options.ProtectionKeyfiles, false, true, true, false, true, true, LangString["IDT_HIDDEN_PROT_PASSWD"]); + ProtectionPasswordPanel = new VolumePasswordPanel (ProtectionSizer->GetStaticBox(), &options, options.ProtectionPassword, options.ProtectionKeyfiles, false, true, true, false, true, true, LangString["IDT_HIDDEN_PROT_PASSWD"]); ProtectionPasswordPanel->TopOwnerParent = this; ProtectionPasswordSizer->Add (ProtectionPasswordPanel, 1, wxALL | wxEXPAND); @@ -110,8 +104,6 @@ namespace VeraCrypt void MountOptionsDialog::OnOKButtonClick (wxCommandEvent& event) { - bool bUnsupportedKdf = false; - /* verify that PIM values are valid before continuing*/ int Pim = PasswordPanel->GetVolumePim(); int ProtectionPim = (!ReadOnlyCheckBox->IsChecked() && ProtectionCheckBox->IsChecked())? @@ -149,13 +141,7 @@ namespace VeraCrypt } Options.Pim = Pim; - Options.Kdf = PasswordPanel->GetPkcs5Kdf(bUnsupportedKdf); - if (bUnsupportedKdf) - { - Gui->ShowWarning (LangString ["ALGO_NOT_SUPPORTED_FOR_TRUECRYPT_MODE"]); - return; - } - Options.TrueCryptMode = PasswordPanel->GetTrueCryptMode(); + Options.Kdf = PasswordPanel->GetPkcs5Kdf(); Options.Keyfiles = PasswordPanel->GetKeyfiles(); if (ReadOnlyCheckBox->IsChecked()) @@ -166,7 +152,7 @@ namespace VeraCrypt { try { - Options.ProtectionPassword = ProtectionPasswordPanel->GetPassword(Options.TrueCryptMode); + Options.ProtectionPassword = ProtectionPasswordPanel->GetPassword(false); } catch (PasswordException& e) { @@ -175,12 +161,7 @@ namespace VeraCrypt } Options.Protection = VolumeProtection::HiddenVolumeReadOnly; Options.ProtectionPim = ProtectionPim; - Options.ProtectionKdf = ProtectionPasswordPanel->GetPkcs5Kdf(Options.TrueCryptMode, bUnsupportedKdf); - if (bUnsupportedKdf) - { - Gui->ShowWarning (LangString ["ALGO_NOT_SUPPORTED_FOR_TRUECRYPT_MODE"]); - return; - } + Options.ProtectionKdf = ProtectionPasswordPanel->GetPkcs5Kdf(); Options.ProtectionKeyfiles = ProtectionPasswordPanel->GetKeyfiles(); } else |