From 321715202aed04dd9892d1c0686d080763ab212d Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 2 Mar 2019 10:14:21 +0100 Subject: Windows: Generalize RAM encryption for keys to VeraCrypt binaries, especially Format and Expander --- src/ExpandVolume/ExpandVolume.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ExpandVolume') diff --git a/src/ExpandVolume/ExpandVolume.c b/src/ExpandVolume/ExpandVolume.c index 0a9733a4..5a476ba3 100644 --- a/src/ExpandVolume/ExpandVolume.c +++ b/src/ExpandVolume/ExpandVolume.c @@ -672,6 +672,13 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas goto error; } +#ifdef _WIN64 + if (IsRamEncryptionEnabled()) + { + VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); + } +#endif + if (cryptoInfo->HeaderFlags & TC_HEADER_FLAG_ENCRYPTED_SYSTEM) { nStatus = ERR_SYS_HIDVOL_HEAD_REENC_MODE_WRONG; -- cgit v1.2.3