diff options
Diffstat (limited to 'src/Main/Forms/MountOptionsDialog.cpp')
-rw-r--r-- | src/Main/Forms/MountOptionsDialog.cpp | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/src/Main/Forms/MountOptionsDialog.cpp b/src/Main/Forms/MountOptionsDialog.cpp index c54ff8e6..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,8 @@ namespace VeraCrypt OptionsButton->SetLabel (OptionsButtonLabel + L" >"); OptionsPanel->Show (false); - ProtectionPasswordPanel = new VolumePasswordPanel (OptionsPanel, &options, options.ProtectionPassword, true, options.ProtectionKeyfiles, false, true, true, false, true, true, _("P&assword to hidden volume:")); + 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); UpdateDialog(); @@ -109,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())? @@ -143,18 +136,12 @@ namespace VeraCrypt if (Options.PartitionInSystemEncryptionScope && Options.Password->Size() > VolumePassword::MaxLegacySize) { - Gui->ShowWarning (StringFormatter (_("System Encryption password is longer than {0} characters."), (int) VolumePassword::MaxLegacySize)); + Gui->ShowWarning (StringFormatter (LangString["LINUX_SYSTEM_ENC_PW_LENGTH_NOTE"], (int) VolumePassword::MaxLegacySize)); return; } 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()) @@ -165,7 +152,7 @@ namespace VeraCrypt { try { - Options.ProtectionPassword = ProtectionPasswordPanel->GetPassword(Options.TrueCryptMode); + Options.ProtectionPassword = ProtectionPasswordPanel->GetPassword(false); } catch (PasswordException& e) { @@ -174,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 @@ -192,6 +174,7 @@ namespace VeraCrypt Options.MountPoint = make_shared <DirectoryPath> (mountPoint); Options.FilesystemOptions = FilesystemOptionsTextCtrl->GetValue(); + Options.EMVSupportEnabled = Gui->GetPreferences().EMVSupportEnabled; EndModal (wxID_OK); } |