VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2016-12-04 13:47:30 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-05 17:36:50 +0200
commit34084323db70bc5bedb98d371a30b83ed0e2ada0 (patch)
tree9c451722f9006c8474c42d8b5f65ea772eb3353f /Library
parent6701b862aa96775609a7d42662ae4a98e43071bb (diff)
downloadVeraCrypt-DCS-34084323db70bc5bedb98d371a30b83ed0e2ada0.tar.gz
VeraCrypt-DCS-34084323db70bc5bedb98d371a30b83ed0e2ada0.zip
SC stub
Diffstat (limited to 'Library')
-rw-r--r--Library/PasswordLib/ConsolePassword.c4
-rw-r--r--Library/PasswordLib/PicturePassword.c17
2 files changed, 21 insertions, 0 deletions
diff --git a/Library/PasswordLib/ConsolePassword.c b/Library/PasswordLib/ConsolePassword.c
index fc03d24..1d82fd0 100644
--- a/Library/PasswordLib/ConsolePassword.c
+++ b/Library/PasswordLib/ConsolePassword.c
@@ -75,6 +75,10 @@ AskConsolePwdInt(
ConsoleShowTip(gTPMLocked ? L" TPM locked!" : L" TPM unlocked!", 10000000);
}
+ if (key.ScanCode == SCAN_F9) {
+ gSCLocked = gSCLocked ? 0 : 1;
+ ConsoleShowTip(gSCLocked ? L" Smart card locked!" : L" Smart card unlocked!", 10000000);
+ }
if (key.UnicodeChar == CHAR_CARRIAGE_RETURN) {
*retCode = AskPwdRetLogin;
diff --git a/Library/PasswordLib/PicturePassword.c b/Library/PasswordLib/PicturePassword.c
index 053a4ad..e737a99 100644
--- a/Library/PasswordLib/PicturePassword.c
+++ b/Library/PasswordLib/PicturePassword.c
@@ -131,6 +131,8 @@ CHAR8* msgPlatformLocked = "PLT\nlkd";
CHAR8* msgPlatformUnLocked = "PLT\nunlkd";
CHAR8* msgTpmLocked = "TPM\nlkd";
CHAR8* msgTpmUnLocked = "TPM\nunlkd";
+CHAR8* msgSCLocked = "SC\nlkd";
+CHAR8* msgSCUnLocked = "SC\nunlkd";
TOUCH_ZONE TZN_Login = { 0, NULL, tznLogin, 128 };
TOUCH_ZONE TZN_Speaker = { 2, NULL, tznBeep, 64 };
@@ -138,6 +140,7 @@ TOUCH_ZONE TZN_Show = { 3, NULL, tznShow, 64 };
TOUCH_ZONE TZN_Change = { 5, NULL, tznChange, 32 };
TOUCH_ZONE TZN_Platform = { 6, NULL, 0, 32 };
TOUCH_ZONE TZN_Tpm = { 7, NULL, 0, 32 };
+TOUCH_ZONE TZN_SC = { 8, NULL, 0, 32 };
VOID
DrawTouchZone(
@@ -342,6 +345,9 @@ AskPictPwdInt(
TZN_Tpm.Message = gTPMLocked ? msgTpmLocked : msgTpmUnLocked;
DrawTouchZone(&TZN_Tpm);
+ TZN_SC.Message = gSCLocked ? msgSCLocked : msgSCUnLocked;
+ DrawTouchZone(&TZN_SC);
+
TZN_Show.Message = gPasswordVisible ? msgHidePwd : msgShowPwd;
DrawTouchZone(&TZN_Show);
cellSelected = MEM_ALLOC(sizeof(UINTN) * 2 * (pwdMax + 1));
@@ -479,6 +485,10 @@ AskPictPwdInt(
gTPMLocked = gTPMLocked ? 0 : 1;
pwdAction = PwdActUpdateZones;
break;
+ case SCAN_F9:
+ gSCLocked = gSCLocked ? 0 : 1;
+ pwdAction = PwdActUpdateZones;
+ break;
default:
;
}
@@ -554,6 +564,10 @@ AskPictPwdInt(
gPlatformLocked = gPlatformLocked ? 0 : 1;
pwdAction = PwdActUpdateZones;
}
+ if (IsTouchZone(&TZN_SC, curX, curY)) {
+ gSCLocked = gSCLocked ? 0 : 1;
+ pwdAction = PwdActUpdateZones;
+ }
}
}
@@ -614,6 +628,9 @@ AskPictPwdInt(
TZN_Tpm.Message = gTPMLocked ? msgTpmLocked : msgTpmUnLocked;
DrawTouchZone(&TZN_Tpm);
+
+ TZN_SC.Message = gSCLocked ? msgSCLocked : msgSCUnLocked;
+ DrawTouchZone(&TZN_SC);
}
if (curPrevX != curX || curPrevY != curY) {