VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumePasswordPanel.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-07-24 08:48:52 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-07-24 08:48:52 +0200
commit3f976c24d2c991f8634991371cbb99662f979022 (patch)
treeb2e6af95be6cb091506c8ba0a1f2230a493fa742 /src/Main/Forms/VolumePasswordPanel.cpp
parentba74b9d5b84c9e8ce692489985ae331386359cb0 (diff)
downloadVeraCrypt-3f976c24d2c991f8634991371cbb99662f979022.tar.gz
VeraCrypt-3f976c24d2c991f8634991371cbb99662f979022.zip
Linux/macOS: Remove TrueCrypt support
Diffstat (limited to 'src/Main/Forms/VolumePasswordPanel.cpp')
-rw-r--r--src/Main/Forms/VolumePasswordPanel.cpp54
1 files changed, 5 insertions, 49 deletions
diff --git a/src/Main/Forms/VolumePasswordPanel.cpp b/src/Main/Forms/VolumePasswordPanel.cpp
index 5bd98daa..32b92edc 100644
--- a/src/Main/Forms/VolumePasswordPanel.cpp
+++ b/src/Main/Forms/VolumePasswordPanel.cpp
@@ -18,7 +18,7 @@
namespace VeraCrypt
{
- VolumePasswordPanel::VolumePasswordPanel (wxWindow* parent, MountOptions* options, shared_ptr <VolumePassword> password, bool disableTruecryptMode, shared_ptr <KeyfileList> keyfiles, bool enableCache, bool enablePassword, bool enableKeyfiles, bool enableConfirmation, bool enablePkcs5Prf, bool isMountPassword, const wxString &passwordLabel)
+ VolumePasswordPanel::VolumePasswordPanel (wxWindow* parent, MountOptions* options, shared_ptr <VolumePassword> password, shared_ptr <KeyfileList> keyfiles, bool enableCache, bool enablePassword, bool enableKeyfiles, bool enableConfirmation, bool enablePkcs5Prf, bool isMountPassword, const wxString &passwordLabel)
: VolumePasswordPanelBase (parent), TopOwnerParent(NULL), Keyfiles (new KeyfileList), EnablePimEntry (true)
{
size_t maxPasswordLength = CmdLine->ArgUseLegacyPassword? VolumePassword::MaxLegacySize : VolumePassword::MaxSize;
@@ -78,22 +78,9 @@ namespace VeraCrypt
Pkcs5PrfStaticText->Show (enablePkcs5Prf);
Pkcs5PrfChoice->Show (enablePkcs5Prf);
- TrueCryptModeCheckBox->Show (!disableTruecryptMode);
HeaderWipeCountText->Show (enablePkcs5Prf && !isMountPassword);
HeaderWipeCount->Show (enablePkcs5Prf && !isMountPassword);
- if (options && !disableTruecryptMode)
- {
- TrueCryptModeCheckBox->SetValue (options->TrueCryptMode);
- if (options->TrueCryptMode)
- {
- PimCheckBox->Enable (false);
- VolumePimStaticText->Enable (false);
- VolumePimTextCtrl->Enable (false);
- VolumePimHelpStaticText->Enable (false);
- }
- }
-
if (EnablePimEntry && options && options->Pim > 0)
{
PimCheckBox->SetValue (true);
@@ -113,7 +100,7 @@ namespace VeraCrypt
Pkcs5PrfChoice->Delete (0);
Pkcs5PrfChoice->Append (LangString["AUTODETECTION"]);
}
- foreach_ref (const Pkcs5Kdf &kdf, Pkcs5Kdf::GetAvailableAlgorithms(false))
+ foreach_ref (const Pkcs5Kdf &kdf, Pkcs5Kdf::GetAvailableAlgorithms())
{
if (!kdf.IsDeprecated() || isMountPassword)
{
@@ -221,7 +208,7 @@ namespace VeraCrypt
shared_ptr <VolumePassword> VolumePasswordPanel::GetPassword (bool bForceLegacyPassword) const
{
- return GetPassword (PasswordTextCtrl, bForceLegacyPassword || GetTrueCryptMode());
+ return GetPassword (PasswordTextCtrl, bForceLegacyPassword);
}
shared_ptr <VolumePassword> VolumePasswordPanel::GetPassword (wxTextCtrl *textCtrl, bool bLegacyPassword) const
@@ -246,14 +233,8 @@ namespace VeraCrypt
return password;
}
- shared_ptr <Pkcs5Kdf> VolumePasswordPanel::GetPkcs5Kdf (bool &bUnsupportedKdf) const
- {
- return GetPkcs5Kdf (GetTrueCryptMode(), bUnsupportedKdf);
- }
-
- shared_ptr <Pkcs5Kdf> VolumePasswordPanel::GetPkcs5Kdf (bool bTrueCryptMode, bool &bUnsupportedKdf) const
+ shared_ptr <Pkcs5Kdf> VolumePasswordPanel::GetPkcs5Kdf () const
{
- bUnsupportedKdf = false;
try
{
int index = Pkcs5PrfChoice->GetSelection ();
@@ -263,11 +244,10 @@ namespace VeraCrypt
return shared_ptr <Pkcs5Kdf> ();
}
else
- return Pkcs5Kdf::GetAlgorithm (wstring (Pkcs5PrfChoice->GetStringSelection()), bTrueCryptMode);
+ return Pkcs5Kdf::GetAlgorithm (wstring (Pkcs5PrfChoice->GetStringSelection()));
}
catch (ParameterIncorrect&)
{
- bUnsupportedKdf = true;
return shared_ptr <Pkcs5Kdf> ();
}
}
@@ -303,21 +283,6 @@ namespace VeraCrypt
}
}
- bool VolumePasswordPanel::GetTrueCryptMode () const
- {
- return TrueCryptModeCheckBox->GetValue ();
- }
-
- void VolumePasswordPanel::SetTrueCryptMode (bool trueCryptMode)
- {
- bool bEnablePIM = !trueCryptMode;
- TrueCryptModeCheckBox->SetValue (trueCryptMode);
- PimCheckBox->Enable (bEnablePIM);
- VolumePimStaticText->Enable (bEnablePIM);
- VolumePimTextCtrl->Enable (bEnablePIM);
- VolumePimHelpStaticText->Enable (bEnablePIM);
- }
-
int VolumePasswordPanel::GetHeaderWipeCount () const
{
try
@@ -515,13 +480,4 @@ namespace VeraCrypt
layoutParent->Fit();
}
}
-
- void VolumePasswordPanel::OnTrueCryptModeChecked( wxCommandEvent& event )
- {
- bool bEnablePIM = !GetTrueCryptMode ();
- PimCheckBox->Enable (bEnablePIM);
- VolumePimStaticText->Enable (bEnablePIM);
- VolumePimTextCtrl->Enable (bEnablePIM);
- VolumePimHelpStaticText->Enable (bEnablePIM);
- }
}