VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/ChangePasswordDialog.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-30 17:01:49 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-30 17:06:20 +0100
commitc178e325b807258199ae45b2c50c265b4d7ce7af (patch)
tree905297a12e86b71d4611ff13d1df7e99c1e20b61 /src/Main/Forms/ChangePasswordDialog.cpp
parent8d787dcd7128fce554f473da62e20162b0b6c9c4 (diff)
downloadVeraCrypt-c178e325b807258199ae45b2c50c265b4d7ce7af.tar.gz
VeraCrypt-c178e325b807258199ae45b2c50c265b4d7ce7af.zip
Linux/MacOSX: Implement TrueCrypt conversion and loading support. Correct many GTK issues linked to multi-threaded origine of events by implementing an automatic mechanism for handling such requests in the main thread.
Diffstat (limited to 'src/Main/Forms/ChangePasswordDialog.cpp')
-rw-r--r--[-rwxr-xr-x]src/Main/Forms/ChangePasswordDialog.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Main/Forms/ChangePasswordDialog.cpp b/src/Main/Forms/ChangePasswordDialog.cpp
index 75fe717c..1bde4bee 100755..100644
--- a/src/Main/Forms/ChangePasswordDialog.cpp
+++ b/src/Main/Forms/ChangePasswordDialog.cpp
@@ -48,11 +48,11 @@ namespace VeraCrypt
throw ParameterIncorrect (SRC_POS);
}
- CurrentPasswordPanel = new VolumePasswordPanel (this, password, keyfiles, false, true, true, false, true, true);
+ CurrentPasswordPanel = new VolumePasswordPanel (this, password, false, keyfiles, false, true, true, false, true, true);
CurrentPasswordPanel->UpdateEvent.Connect (EventConnector <ChangePasswordDialog> (this, &ChangePasswordDialog::OnPasswordPanelUpdate));
CurrentPasswordPanelSizer->Add (CurrentPasswordPanel, 1, wxALL | wxEXPAND);
- NewPasswordPanel = new VolumePasswordPanel (this, newPassword, newKeyfiles, false, enableNewPassword, enableNewKeyfiles, enableNewPassword, enablePkcs5Prf);
+ NewPasswordPanel = new VolumePasswordPanel (this, newPassword, true, newKeyfiles, false, enableNewPassword, enableNewKeyfiles, enableNewPassword, enablePkcs5Prf);
NewPasswordPanel->UpdateEvent.Connect (EventConnector <ChangePasswordDialog> (this, &ChangePasswordDialog::OnPasswordPanelUpdate));
NewPasswordPanelSizer->Add (NewPasswordPanel, 1, wxALL | wxEXPAND);
@@ -81,6 +81,14 @@ namespace VeraCrypt
try
{
+ shared_ptr <Pkcs5Kdf> currentKdf = CurrentPasswordPanel->GetPkcs5Kdf();
+ if (currentKdf && CurrentPasswordPanel->GetTrueCryptMode() && (currentKdf->GetName() == L"HMAC-SHA-256"))
+ {
+ Gui->ShowWarning (LangString ["ALGO_NOT_SUPPORTED_FOR_TRUECRYPT_MODE"]);
+ event.Skip();
+ return;
+ }
+
shared_ptr <VolumePassword> newPassword;
if (DialogMode == Mode::ChangePasswordAndKeyfiles)
{
@@ -126,7 +134,7 @@ namespace VeraCrypt
#endif
wxBusyCursor busy;
ChangePasswordThreadRoutine routine(Path, Gui->GetPreferences().DefaultMountOptions.PreserveTimestamps,
- CurrentPasswordPanel->GetPassword(), CurrentPasswordPanel->GetPkcs5Kdf(), CurrentPasswordPanel->GetKeyfiles(),
+ CurrentPasswordPanel->GetPassword(), CurrentPasswordPanel->GetPkcs5Kdf(), CurrentPasswordPanel->GetTrueCryptMode(),CurrentPasswordPanel->GetKeyfiles(),
newPassword, newKeyfiles, NewPasswordPanel->GetPkcs5Kdf(), NewPasswordPanel->GetHeaderWipeCount());
WaitDialog dlg(this, LangString["IDT_STATIC_MODAL_WAIT_DLG_INFO"], &routine);
dlg.Run();