VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/BaseCom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/BaseCom.cpp')
-rw-r--r--src/Common/BaseCom.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Common/BaseCom.cpp b/src/Common/BaseCom.cpp
index 738e44c..7a74e29 100644
--- a/src/Common/BaseCom.cpp
+++ b/src/Common/BaseCom.cpp
@@ -336,6 +336,10 @@ DWORD BaseCom::BackupEfiSystemLoader ()
{
return GetLastError();
}
+ catch (UserAbort&)
+ {
+ return ERROR_CANCELLED;
+ }
catch (Exception &e)
{
e.Show (NULL);
@@ -400,6 +404,33 @@ DWORD BaseCom::GetEfiBootDeviceNumber (BSTR* pSdn)
return ERROR_SUCCESS;
}
+DWORD BaseCom::GetSecureBootConfig (BOOL* pSecureBootEnabled, BOOL *pVeraCryptKeysLoaded)
+{
+ if (!pSecureBootEnabled || !pVeraCryptKeysLoaded)
+ return ERROR_INVALID_PARAMETER;
+
+ try
+ {
+ BootEncryption bootEnc (NULL);
+ bootEnc.GetSecureBootConfig (pSecureBootEnabled, pVeraCryptKeysLoaded);
+ }
+ catch (SystemException &)
+ {
+ return GetLastError();
+ }
+ catch (Exception &e)
+ {
+ e.Show (NULL);
+ return ERROR_EXCEPTION_IN_SERVICE;
+ }
+ catch (...)
+ {
+ return ERROR_EXCEPTION_IN_SERVICE;
+ }
+
+ return ERROR_SUCCESS;
+}
+
DWORD BaseCom::WriteEfiBootSectorUserConfig (DWORD userConfig, BSTR customUserMessage, int pim, int hashAlg)
{
if (!customUserMessage)