VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library/VeraCryptLib/DcsVeraCrypt.h
blob: e6ee57cabc55de843933a3786a8b957642fb610e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/** @file
Interface for DCS services

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 Apache License, Version 2.0.  

The full text of the license may be found at
https://opensource.org/licenses/Apache-2.0
**/

#ifndef __DCSVERACRYPT_H__
#define __DCSVERACRYPT_H__

#include <Uefi.h>
#include <common/Tcdefs.h>
#include <common/Password.h>

//////////////////////////////////////////////////////////////////////////
// Auth
//////////////////////////////////////////////////////////////////////////
extern int gAuthPasswordType;
extern CHAR16*	gPasswordPictureFileName;
extern char* gAuthPasswordMsg;
extern Password gAuthPassword;

extern UINT8 gAutoLogin;
extern char* gAutoPassword;

extern char* gAuthPimMsg;
extern int gAuthPimRqt;
extern int gAuthPim;

extern int gAuthTcRqt;
extern int gAuthTc;

extern char *gAuthHashMsg;
extern int gAuthHashRqt;
extern int gAuthHash;

extern int gAuthBootRqt;
extern int gAuthBoot;

extern int gAuthRetry;
extern int gRndDefault;

extern char* gAuthStartMsg;
extern char* gAuthErrorMsg;

extern INT32 gRUD;

extern int gAuthSecRegionSearch;

extern int gPlatformLocked;
extern int gTPMLocked;
extern int gSCLocked;

extern int gAuthPwdCode;

extern CHAR8* gPlatformKeyFile;
extern UINTN gPlatformKeyFileSize;

extern EFI_GUID *gPartitionGuidOS;
extern int gDcsBootForce;
extern char* gForcePasswordMsg;
extern int gForcePasswordType;
extern UINT8 gForcePasswordProgress;

extern CHAR8* gOnExitFailed;
extern CHAR8* gOnExitSuccess;
extern CHAR8* gOnExitNotFound;

void
VCAuthAsk();

VOID
VCAskPwd(
	IN	 UINTN	pwdType,
	OUT Password* vcPwd);

VOID
VCAuthLoadConfig();

VOID
ApplyKeyFile(
	IN OUT Password* password,
	IN     CHAR8*    keyfileData,
	IN     UINTN     keyfileDataSize
	);

#endif