From b87fc6b140772ba3017de311c7063c259424264c Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 15 Aug 2016 17:11:31 +0200 Subject: First public release. Used by VeraCrypt 1.18. --- Include/Library/PasswordLib.h | 108 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 Include/Library/PasswordLib.h (limited to 'Include/Library/PasswordLib.h') diff --git a/Include/Library/PasswordLib.h b/Include/Library/PasswordLib.h new file mode 100644 index 0000000..62cad21 --- /dev/null +++ b/Include/Library/PasswordLib.h @@ -0,0 +1,108 @@ +/** @file +Password library + +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 __PASSWORDLIB_H__ +#define __PASSWORDLIB_H__ + +#include +#include + +extern CHAR16* gPasswordPictureFileName; + +extern CHAR8* gPasswordPictureChars; +extern CHAR8* gPasswordPictureCharsDefault; +extern UINTN gPasswordPictureCharsLen; +extern UINT8 gPasswordVisible; +extern int gPasswordShowMark; + +extern int gPlatformLocked; +extern int gTPMLocked; +extern int gSCLocked; + +enum AskPwdType { + AskPwdLogin = 1, + AskPwdNew, + AskPwdConfirm +}; + +enum AskPwdRetCode { + AskPwdRetCancel = 0, + AskPwdRetLogin = 1, + AskPwdRetChange +}; + +VOID +AskPictPwdInt( + IN UINTN pwdType, + IN UINTN pwdMax, + OUT CHAR8* pwd, + OUT UINT32* pwdLen, + OUT INT32* retCode + ); + +VOID +AskConsolePwdInt( + OUT UINT32 *length, + OUT CHAR8 *asciiLine, + OUT INT32 *retCode, + IN UINTN line_max, + IN UINT8 show + ); + +extern EFI_GUID* gSmbSystemUUID; // Universal unique ID +extern CHAR8* gSmbSystemSerial; // System serial +extern CHAR8* gSmbSystemSKU; // SKU number +extern CHAR8* gSmbBaseBoardSerial; // Base board serial +extern UINT64* gSmbProcessorID; // Processor ID + +EFI_STATUS +SMBIOSGetSerials(); + +EFI_STATUS +PaltformGetIDCRC( + IN EFI_HANDLE handle, + OUT UINT32 *crc32 + ); + +EFI_STATUS +PlatformGetID( + IN EFI_HANDLE handle, + OUT CHAR8 **id, + OUT UINTN *idLen + ); + +EFI_STATUS +PlatformGetIDCRC( + IN EFI_HANDLE handle, + OUT UINT32 *crc32 + ); + +extern UINTN gBioIndexAuth; +extern BOOLEAN gBioIndexAuthOnRemovable; + +typedef struct _DCS_AUTH_DATA_MARK { + UINT32 HeaderCrc; + UINT32 PlatformCrc; + UINT32 AuthDataSize; + UINT32 Reserved; +} DCS_AUTH_DATA_MARK; + + +EFI_STATUS +PlatformGetAuthData( + OUT UINT8 **data, + OUT UINTN *len, + OUT EFI_HANDLE *secRegionHandle + ); + +#endif \ No newline at end of file -- cgit v1.2.3