From 9881744c95737264c7cd9f13b3c70042c03584aa Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 1 Jan 2021 23:58:06 +0100 Subject: Windows: Add support for ARM64 platform (e.g. Microsoft Surface Pro X). System encryption still not implemented on ARM64 --- src/Mount/Mount.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'src/Mount/Mount.c') diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 07980c76..343be9d4 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -4639,6 +4639,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa goto stop; } + // Main app ARM 64-bit + StringCbPrintfW(srcPath, sizeof(srcPath), L"%s\\VeraCrypt-arm64.exe", appDir); + StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt-arm64.exe", dstDir); + if (!VerifyModuleSignature(srcPath)) + { + Error("DIST_PACKAGE_CORRUPTED", hwndDlg); + goto stop; + } + else if (!TCCopyFile(srcPath, dstPath)) + { + handleWin32Error(hwndDlg, SRC_POS); + goto stop; + } + // Wizard if (copyWizard) { @@ -4669,6 +4683,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa handleWin32Error (hwndDlg, SRC_POS); goto stop; } + + // Wizard ARM 64-bit + StringCbPrintfW(srcPath, sizeof(srcPath), L"%s\\VeraCrypt Format-arm64.exe", appDir); + StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt Format-arm64.exe", dstDir); + if (!VerifyModuleSignature(srcPath)) + { + Error("DIST_PACKAGE_CORRUPTED", hwndDlg); + goto stop; + } + else if (!TCCopyFile(srcPath, dstPath)) + { + handleWin32Error(hwndDlg, SRC_POS); + goto stop; + } } // Expander @@ -4701,6 +4729,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa handleWin32Error (hwndDlg, SRC_POS); goto stop; } + + // Expander ARM 64-bit + StringCbPrintfW(srcPath, sizeof(srcPath), L"%s\\VeraCryptExpander-arm64.exe", appDir); + StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCryptExpander-arm64.exe", dstDir); + if (!VerifyModuleSignature(srcPath)) + { + Error("DIST_PACKAGE_CORRUPTED", hwndDlg); + goto stop; + } + else if (!TCCopyFile(srcPath, dstPath)) + { + handleWin32Error(hwndDlg, SRC_POS); + goto stop; + } } // Driver @@ -4730,6 +4772,20 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa handleWin32Error (hwndDlg, SRC_POS); goto stop; } + + // Driver ARM64 + StringCbPrintfW(srcPath, sizeof(srcPath), L"%s\\veracrypt-arm64.sys", appDir); + StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\veracrypt-arm64.sys", dstDir); + if (!VerifyModuleSignature(srcPath)) + { + Error("DIST_PACKAGE_CORRUPTED", hwndDlg); + goto stop; + } + else if (!TCCopyFile(srcPath, dstPath)) + { + handleWin32Error(hwndDlg, SRC_POS); + goto stop; + } } else { -- cgit v1.2.3