VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/Ntvol.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-04-08 23:51:29 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-04-08 23:53:49 +0200
commit60575d9a496bd4b796bab73888b69c249a1f8048 (patch)
treedc242c1029d53807c21c6779d68de7e3e83cd597 /src/Driver/Ntvol.c
parent409c0f79be069cd2cf3bdb31ddbbafd938f15791 (diff)
downloadVeraCrypt-60575d9a496bd4b796bab73888b69c249a1f8048.tar.gz
VeraCrypt-60575d9a496bd4b796bab73888b69c249a1f8048.zip
Windows: start implementation of volume ID mechanism that will be used to identify VeraCrypt disk volumes instead of device name.
Diffstat (limited to 'src/Driver/Ntvol.c')
-rw-r--r--src/Driver/Ntvol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c
index 46dd46fd..317e3653 100644
--- a/src/Driver/Ntvol.c
+++ b/src/Driver/Ntvol.c
@@ -517,6 +517,9 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
Extension->cryptoInfo->bPartitionInInactiveSysEncScope = mount->bPartitionInInactiveSysEncScope;
+ /* compute the ID of this volume: SHA-512 of the effective header */
+ sha512 (Extension->volumeID, readBuffer, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
+
if (volumeType == TC_VOLUME_TYPE_NORMAL)
{
if (mount->bPartitionInInactiveSysEncScope)