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 /DcsInt | |
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 'DcsInt')
-rw-r--r-- | DcsInt/DcsInt.c | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/DcsInt/DcsInt.c b/DcsInt/DcsInt.c index 06f8841..3303c56 100644 --- a/DcsInt/DcsInt.c +++ b/DcsInt/DcsInt.c @@ -986,6 +986,32 @@ VCAuthLoadConfigUpdated(UINT8* secRegion, UINTN secRegionSize) { }
}
+VOID
+Pause(
+ IN UINTN seconds
+ )
+{
+ if (seconds) {
+ EFI_INPUT_KEY key;
+ key = KeyWait(L"%2d \r", seconds, 0, 0);
+ if (key.UnicodeChar != 0) {
+ GetKey();
+ }
+ }
+}
+
+VOID
+PauseHandleInfo(
+ IN EFI_HANDLE hndle,
+ IN UINTN seconds)
+{
+ if (seconds) {
+ EfiPrintDevicePath(hndle);
+ Pause(seconds);
+ OUT_PRINT(L"\n");
+ }
+}
+
//////////////////////////////////////////////////////////////////////////
// Driver Entry Point
//////////////////////////////////////////////////////////////////////////
@@ -1007,15 +1033,8 @@ UefiMain( if (gAuthSecRegionSearch) {
res = PlatformGetAuthData(&SecRegionData, &SecRegionSize, &SecRegionHandle);
if (!EFI_ERROR(res)) {
- EFI_INPUT_KEY key;
- EfiPrintDevicePath(SecRegionHandle);
- OUT_PRINT(L"\n");
VCAuthLoadConfigUpdated(SecRegionData, SecRegionSize);
- key = KeyWait(L"%2d \r", 2, 0, 0);
- if (key.UnicodeChar != 0) {
- GetKey();
- }
- OUT_PRINT(L"\n");
+ PauseHandleInfo(SecRegionHandle, gSecRegionInfoDelay);
}
} else if (gRUD != 0) {
// RUD defined
@@ -1028,10 +1047,10 @@ UefiMain( if (!EFI_ERROR(res) && id != NULL) {
INT32 rud;
rud = GetCrc32((unsigned char*)id, (int)AsciiStrLen(id));
- OUT_PRINT(L"%d ? %d\n", gRUD, rud);
MEM_FREE(id);
if (rud == gRUD) {
devFound = TRUE;
+ PauseHandleInfo(SecRegionHandle, gSecRegionInfoDelay);
break;
}
}
@@ -1093,9 +1112,9 @@ UefiMain( if (gConfigBuffer != NULL) {
TpmMeasure(gConfigBuffer, gConfigBufferSize); // Measure configuration
}
- if (gTpm->IsConfigured(gTpm) && !gTpm->IsOpen(gTpm)) {
+ if (gTpm->IsConfigured(gTpm) && !gTpm->IsOpen(gTpm) && gTPMLockedInfoDelay) {
ERR_PRINT(L"TPM is configured but locked. Probably boot chain is modified!\n");
- KeyWait(L"%1d\r", 9, 0, 0);
+ Pause(gTPMLockedInfoDelay);
}
}
|