mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-09 22:36:59 -05:00
Linux/macOS: Remove TrueCrypt support
This commit is contained in:
@@ -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
|
||||
shared_ptr <Pkcs5Kdf> VolumePasswordPanel::GetPkcs5Kdf () const
|
||||
{
|
||||
return GetPkcs5Kdf (GetTrueCryptMode(), bUnsupportedKdf);
|
||||
}
|
||||
|
||||
shared_ptr <Pkcs5Kdf> VolumePasswordPanel::GetPkcs5Kdf (bool bTrueCryptMode, bool &bUnsupportedKdf) 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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user