diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-10-14 23:07:33 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-10-15 01:36:10 +0200 |
commit | 19483d20975148940ad26c0145acb5940b03afc3 (patch) | |
tree | cebfa501a5bbb544ab3ba6f559ad663523eb105a /src/Boot | |
parent | 225acf4a22cb6daf613471cdf0fedb61f383ea97 (diff) | |
download | VeraCrypt-19483d20975148940ad26c0145acb5940b03afc3.tar.gz VeraCrypt-19483d20975148940ad26c0145acb5940b03afc3.zip |
Windows Bootloader: Protect password/PIM length by filling the fields to their maximum length with '*' after ENTER is hit
Diffstat (limited to 'src/Boot')
-rw-r--r-- | src/Boot/Windows/BootCommon.h | 2 | ||||
-rw-r--r-- | src/Boot/Windows/BootMain.cpp | 24 |
2 files changed, 22 insertions, 4 deletions
diff --git a/src/Boot/Windows/BootCommon.h b/src/Boot/Windows/BootCommon.h index 48682fd6..f81b94ea 100644 --- a/src/Boot/Windows/BootCommon.h +++ b/src/Boot/Windows/BootCommon.h @@ -17,7 +17,7 @@ #include "BootDefs.h"
// The user will be advised to upgrade the rescue disk if upgrading from the following or any previous version
-#define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x0113
+#define TC_RESCUE_DISK_UPGRADE_NOTICE_MAX_VERSION 0x0116
#define TC_BOOT_LOADER_AREA_SIZE (TC_BOOT_LOADER_AREA_SECTOR_COUNT * TC_SECTOR_SIZE_BIOS)
diff --git a/src/Boot/Windows/BootMain.cpp b/src/Boot/Windows/BootMain.cpp index 7101139d..f66fd36b 100644 --- a/src/Boot/Windows/BootMain.cpp +++ b/src/Boot/Windows/BootMain.cpp @@ -168,10 +168,19 @@ static byte AskPassword (Password &password, int& pim) switch (scanCode)
{
case TC_BIOS_KEY_ENTER:
+ password.Length = pos;
+ if (hidePassword)
+ {
+ while (pos < MAX_PASSWORD)
+ {
+ PrintChar ('*');
+ pos++;
+ }
+ }
+
ClearBiosKeystrokeBuffer();
PrintEndl();
-
- password.Length = pos;
+
break;
case TC_BIOS_KEY_BACKSPACE:
@@ -228,9 +237,18 @@ static byte AskPassword (Password &password, int& pim) switch (scanCode)
{
case TC_BIOS_KEY_ENTER:
+ if (hidePassword)
+ {
+ while (pos < MAX_PIM)
+ {
+ PrintChar ('*');
+ pos++;
+ }
+ }
+
ClearBiosKeystrokeBuffer();
PrintEndl();
-
+
return TC_BIOS_KEY_ENTER;
case TC_BIOS_KEY_BACKSPACE:
|