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/Common/Format.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Common/Format.c') diff --git a/src/Common/Format.c b/src/Common/Format.c index b67ac511..bd33f754 100644 --- a/src/Common/Format.c +++ b/src/Common/Format.c @@ -171,6 +171,13 @@ int TCFormatVolume (volatile FORMAT_VOL_PARAMETERS *volParams) return nStatus? nStatus : ERR_OUTOFMEMORY; } +#ifdef _WIN64 + if (IsRamEncryptionEnabled ()) + { + VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); + } +#endif + begin_format: if (volParams->bDevice) -- cgit v1.2.3