VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-28 23:31:01 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-28 23:35:47 (GMT)
commit3d6032d69e2450250ebe8d12808b4934fc6a2354 (patch)
tree9356dc2d1a5cae961a60a104d1555fe6d54c9b80 /src/Common
parent954bfd45d05291930d0823b08ea5b84715f188af (diff)
downloadVeraCrypt-3d6032d69e2450250ebe8d12808b4934fc6a2354.zip
VeraCrypt-3d6032d69e2450250ebe8d12808b4934fc6a2354.tar.gz
Windows: better debug messages for VcProtectKeys and VcUnprotectKeys functions
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Crypto.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c
index a88f19a..6a91895 100644
--- a/src/Common/Crypto.c
+++ b/src/Common/Crypto.c
@@ -1437,9 +1437,8 @@ uint64 VcGetEncryptionID (PCRYPTO_INFO pCryptoInfo)
;
}
-void VcProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
+static void VcInternalProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
{
- Dump ("VcProtectKeys BEGIN\n");
#ifdef TC_WINDOWS_DRIVER
VcProtectMemory (encID, pCryptoInfo->ks, MAX_EXPANDED_KEY, pCryptoInfo->ks2, MAX_EXPANDED_KEY);
#else
@@ -1448,12 +1447,21 @@ void VcProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
pCryptoInfo->master_keydata, MASTER_KEYDATA_SIZE,
pCryptoInfo->k2, MASTER_KEYDATA_SIZE);
#endif
+
+}
+
+void VcProtectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
+{
+ Dump ("VcProtectKeys BEGIN\n");
+ VcInternalProtectKeys (pCryptoInfo, encID);
Dump ("VcProtectKeys END\n");
}
void VcUnprotectKeys (PCRYPTO_INFO pCryptoInfo, uint64 encID)
{
- VcProtectKeys (pCryptoInfo, encID);
+ Dump ("VcUnprotectKeys BEGIN\n");
+ VcInternalProtectKeys (pCryptoInfo, encID);
+ Dump ("VcUnprotectKeys END\n");
}
#endif