From 3f976c24d2c991f8634991371cbb99662f979022 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 24 Jul 2023 08:48:52 +0200 Subject: Linux/macOS: Remove TrueCrypt support --- src/Main/Forms/MountOptionsDialog.cpp | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'src/Main/Forms/MountOptionsDialog.cpp') 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 -- cgit v1.2.3