diff options
author | kavsrf <kavsrf@gmail.com> | 2017-02-26 11:42:59 +0300 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-06-05 17:37:36 +0200 |
commit | 10ddedbbac7acb326fb9447c6a1c5f1706017e4b (patch) | |
tree | 26993016e4b1cb9ab71bf046a1cfab7e348738c0 /Library/PasswordLib/ConsolePassword.c | |
parent | fdfe9f849c15dc4b864a72fcbc5266edb68171c1 (diff) | |
download | VeraCrypt-DCS-10ddedbbac7acb326fb9447c6a1c5f1706017e4b.tar.gz VeraCrypt-DCS-10ddedbbac7acb326fb9447c6a1c5f1706017e4b.zip |
PasswordTimeout and infodelay keys in DcsProp
DcsProp documented
included in VeraCrypt Beta2 patch 1
Diffstat (limited to 'Library/PasswordLib/ConsolePassword.c')
-rw-r--r-- | Library/PasswordLib/ConsolePassword.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/PasswordLib/ConsolePassword.c b/Library/PasswordLib/ConsolePassword.c index 797ee4a..6894b50 100644 --- a/Library/PasswordLib/ConsolePassword.c +++ b/Library/PasswordLib/ConsolePassword.c @@ -31,6 +31,20 @@ AskConsolePwdInt( UINTN i;
gST->ConOut->EnableCursor(gST->ConOut, TRUE);
+ if (gPasswordTimeout) {
+ EFI_EVENT InputEvents[2];
+ UINTN EventIndex = 0;
+ InputEvents[0] = gST->ConIn->WaitForKey;
+ gBS->CreateEvent(EVT_TIMER, 0, (EFI_EVENT_NOTIFY)NULL, NULL, &InputEvents[1]);
+ gBS->SetTimer(InputEvents[1], TimerPeriodic, 10000000 * gPasswordTimeout);
+ gBS->WaitForEvent(2, InputEvents, &EventIndex);
+ gPasswordTimeout = 0;
+ gBS->CloseEvent(InputEvents[1]);
+ if (EventIndex == 1) {
+ *retCode = AskPwdRetCancel;
+ return ;
+ }
+ }
do {
key = GetKey();
|