VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/DcsCfg/DcsCfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'DcsCfg/DcsCfg.h')
-rw-r--r--DcsCfg/DcsCfg.h166
1 files changed, 166 insertions, 0 deletions
diff --git a/DcsCfg/DcsCfg.h b/DcsCfg/DcsCfg.h
new file mode 100644
index 0000000..2ffd50d
--- /dev/null
+++ b/DcsCfg/DcsCfg.h
@@ -0,0 +1,166 @@
+
+/** @file
+This is DCS configuration tool. (EFI shell application/wizard)
+
+Copyright (c) 2016. Disk Cryptography Services for EFI (DCS), Alex Kolotnikov
+Copyright (c) 2016. VeraCrypt, Mounir IDRASSI
+
+This program and the accompanying materials
+are licensed and made available under the terms and conditions
+of the GNU Lesser General Public License, version 3.0 (LGPL-3.0).
+
+The full text of the license may be found at
+https://opensource.org/licenses/LGPL-3.0
+**/
+
+#ifndef __DcsCfg_h__
+#define __DcsCfg_h__
+
+#include <Uefi.h>
+#include <Uefi/UefiGpt.h>
+
+//////////////////////////////////////////////////////////////////////////
+// Block I/O
+//////////////////////////////////////////////////////////////////////////
+extern UINTN BioIndexStart;
+extern UINTN BioIndexEnd;
+extern BOOLEAN BioSkipPartitions;
+
+void
+BioPrintDevicePath(
+ UINTN bioIndex
+ );
+
+VOID
+PrintBioList();
+
+EFI_STATUS
+BlockRangeWipe(
+ IN EFI_HANDLE h,
+ IN UINT64 start,
+ IN UINT64 end
+ );
+
+//////////////////////////////////////////////////////////////////////////
+// System crypt
+//////////////////////////////////////////////////////////////////////////
+EFI_STATUS
+VolumeEncrypt(
+ IN UINTN index);
+
+EFI_STATUS
+VolumeDecrypt(
+ IN UINTN index);
+
+EFI_STATUS
+OSRestoreKey();
+
+EFI_STATUS
+OSDecrypt();
+
+EFI_STATUS
+VolumeChangePassword(
+ IN UINTN index);
+
+EFI_STATUS
+CreateVolumeHeaderOnDisk(
+ IN UINTN index,
+ OUT VOID **pinfo,
+ OUT EFI_HANDLE *phDisk,
+ OUT UINT64 *sector
+ );
+
+EFI_STATUS
+GptCryptFile(
+ IN BOOLEAN crypt
+ );
+
+EFI_STATUS
+GptEdit(
+ IN UINTN index
+ );
+
+//////////////////////////////////////////////////////////////////////////
+// Security regions
+//////////////////////////////////////////////////////////////////////////
+extern UINTN gSecRigonCount;
+
+EFI_STATUS
+SecRigionMark();
+
+EFI_STATUS
+SecRigionWipe();
+
+EFI_STATUS
+SecRigionAdd(
+ IN UINTN regIdx
+ );
+//////////////////////////////////////////////////////////////////////////
+// Set DcsInt parameters
+//////////////////////////////////////////////////////////////////////////
+VOID
+UpdateDcsBoot();
+
+//////////////////////////////////////////////////////////////////////////
+// DCS authorization check
+//////////////////////////////////////////////////////////////////////////
+
+EFI_STATUS
+IntCheckVolume(
+ UINTN index
+ );
+
+VOID
+DisksAuthCheck();
+
+VOID
+TestAuthAsk();
+
+
+//////////////////////////////////////////////////////////////////////////
+// RUD / USB
+//////////////////////////////////////////////////////////////////////////
+extern UINTN UsbIndex;
+
+VOID
+PrintUsbList();
+
+VOID
+UsbSelect();
+
+//////////////////////////////////////////////////////////////////////////
+// Beep
+//////////////////////////////////////////////////////////////////////////
+VOID
+PrintSpeakerList();
+
+VOID
+TestSpeaker();
+
+//////////////////////////////////////////////////////////////////////////
+// Graphics
+//////////////////////////////////////////////////////////////////////////
+VOID
+PrintGraphList();
+
+//////////////////////////////////////////////////////////////////////////
+// Touch
+//////////////////////////////////////////////////////////////////////////
+extern UINTN TouchIndex;
+
+VOID
+PrintTouchList();
+
+VOID
+TestTouch();
+
+//////////////////////////////////////////////////////////////////////////
+// Interactive setup
+//////////////////////////////////////////////////////////////////////////
+
+EFI_STATUS
+DcsInteractiveSetup();
+
+
+
+#endif // DcsCfg_h__