VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Format.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-02 10:14:21 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-03-02 10:23:39 +0100
commit321715202aed04dd9892d1c0686d080763ab212d (patch)
tree770d69a4a7bbb992ab0aaf4cb4625e07d2a5255b /src/Common/Format.c
parentedd1b00126fa39396fbb76c73cc3ea17aa955fc8 (diff)
downloadVeraCrypt-321715202aed04dd9892d1c0686d080763ab212d.tar.gz
VeraCrypt-321715202aed04dd9892d1c0686d080763ab212d.zip
Windows: Generalize RAM encryption for keys to VeraCrypt binaries, especially Format and Expander
Diffstat (limited to 'src/Common/Format.c')
-rw-r--r--src/Common/Format.c7
1 files changed, 7 insertions, 0 deletions
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)