diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2022-03-20 20:53:20 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2022-03-21 01:18:27 +0100 |
commit | 538319051857a8fb8e9e8c4f1048ab53e9c26b40 (patch) | |
tree | 1b00ac92b8a1fb5998d08bb6bd4dce9b7b76d77c /src/Common/BootEncryption.cpp | |
parent | dd0f3cd16766cf6245b3a1da139ccad952ab7828 (diff) | |
download | VeraCrypt-538319051857a8fb8e9e8c4f1048ab53e9c26b40.tar.gz VeraCrypt-538319051857a8fb8e9e8c4f1048ab53e9c26b40.zip |
Windows: Block upgrade of VeraCrypt is the system is encrypted using RIPEMD-160 or GOST89 since they are not supported anymore.
Diffstat (limited to 'src/Common/BootEncryption.cpp')
-rw-r--r-- | src/Common/BootEncryption.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp index 9a16db53..079eacc6 100644 --- a/src/Common/BootEncryption.cpp +++ b/src/Common/BootEncryption.cpp @@ -5832,4 +5832,32 @@ namespace VeraCrypt { return (::RestartComputer(bShutdown) != FALSE); } + + bool BootEncryption::IsUsingUnsupportedAlgorithm(LONG driverVersion) + { + bool bRet = false; + + try + { + if (driverVersion <= 0x125) + { + // version 1.25 is last version to support RIPEMD160 and GOST89 + static int GOST89_EA = 5; + static int RIPEMD160_PRF = 4; + + VOLUME_PROPERTIES_STRUCT props = {0}; + GetVolumeProperties(&props); + + // + if (props.ea == GOST89_EA || props.pkcs5 == RIPEMD160_PRF) + bRet = true; + } + } + catch(...) + { + + } + + return bRet; + } } |