diff options
Diffstat (limited to 'src/ExpandVolume/WinMain.cpp')
-rw-r--r-- | src/ExpandVolume/WinMain.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp index 630fc79d..ad0d2f50 100644 --- a/src/ExpandVolume/WinMain.cpp +++ b/src/ExpandVolume/WinMain.cpp @@ -1,14 +1,14 @@ /* Legal Notice: Some portions of the source code contained in this file were - derived from the source code of TrueCrypt 7.1a, which is - Copyright (c) 2003-2012 TrueCrypt Developers Association and which is + derived from the source code of TrueCrypt 7.1a, which is + Copyright (c) 2003-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0, also from the source code of Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux - and which is governed by the 'License Agreement for Encryption for the Masses' + and which is governed by the 'License Agreement for Encryption for the Masses' and also from the source code of extcv, which is Copyright (c) 2009-2010 Kih-Oskh or Copyright (c) 2012-2013 Josef Schneider <josef@netpage.dk> - Modifications and additions to the original source code (contained in this file) + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source @@ -469,7 +469,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableWindow (GetDlgItem (hwndDlg, IDC_MOUNT_OPTIONS), FALSE); } - /* No support for mounting TrueCrypt volumes */ + /* No support for mounting TrueCrypt volumes */ SetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE, FALSE); EnableWindow (GetDlgItem (hwndDlg, IDC_TRUECRYPT_MODE), FALSE); @@ -493,7 +493,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case TC_APPMSG_PREBOOT_PASSWORD_MODE: { - /* No support for mounting TrueCrypt system partition */ + /* No support for mounting TrueCrypt system partition */ SetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE, FALSE); EnableWindow (GetDlgItem (hwndDlg, IDC_TRUECRYPT_MODE), FALSE); @@ -605,7 +605,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (lw == IDC_MOUNT_OPTIONS) { - DialogBoxParamW (hInst, + DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_MOUNT_OPTIONS), hwndDlg, (DLGPROC) MountOptionsDlgProc, (LPARAM) &mountOptions); @@ -670,16 +670,16 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (GetPassword (hwndDlg, IDC_PASSWORD, (LPSTR) szXPwd->Text, MAX_PASSWORD + 1, TRUE)) szXPwd->Length = strlen ((char *) szXPwd->Text); else - return 1; + return 1; - bCacheInDriver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_CACHE)); + bCacheInDriver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_CACHE)); *pkcs5 = (int) SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, SendMessage (GetDlgItem (hwndDlg, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0); *truecryptMode = GetCheckBox (hwndDlg, IDC_TRUECRYPT_MODE); *pim = GetPim (hwndDlg, IDC_PIM); /* SHA-256 is not supported by TrueCrypt */ - if ( (*truecryptMode) + if ( (*truecryptMode) && ((*pkcs5 == SHA256) || (mountOptions.ProtectHiddenVolume && mountOptions.ProtectedHidVolPkcs5Prf == SHA256)) ) { @@ -687,7 +687,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA return 1; } - if ( (*truecryptMode) + if ( (*truecryptMode) && (*pim != 0) ) { @@ -699,8 +699,8 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA // Attempt to wipe password stored in the input field buffer wmemset (tmp, L'X', MAX_PASSWORD); tmp[MAX_PASSWORD] = 0; - SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), tmp); - SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD_PROT_HIDVOL), tmp); + SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD), tmp); + SetWindowText (GetDlgItem (hwndDlg, IDC_PASSWORD_PROT_HIDVOL), tmp); if (hidVolProtKeyFilesParam.FirstKeyFile != NULL) { @@ -713,7 +713,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD); // Restore the original keyboard layout - if (LoadKeyboardLayout (OrigKeyboardLayout, KLF_ACTIVATE | KLF_SUBSTITUTE_OK) == NULL) + if (LoadKeyboardLayout (OrigKeyboardLayout, KLF_ACTIVATE | KLF_SUBSTITUTE_OK) == NULL) Warning ("CANNOT_RESTORE_KEYBOARD_LAYOUT", hwndDlg); } @@ -748,7 +748,7 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA } } } - break; + break; case WM_DROPFILES: { @@ -807,7 +807,7 @@ int ExtcvAskVolumePassword (HWND hwndDlg, const wchar_t* fileName, Password *pas StringCbCopyW (PasswordDlgVolume, sizeof(PasswordDlgVolume), fileName); - result = DialogBoxParamW (hInst, + result = DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_PASSWORD_DLG), hwndDlg, (DLGPROC) ExtcvPasswordDlgProc, (LPARAM) &dlgParam); |