1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-06-17 18:16:07 -05:00

Windows: Block upgrade of VeraCrypt is the system is encrypted using RIPEMD-160 or GOST89 since they are not supported anymore.

This commit is contained in:
Mounir IDRASSI
2022-03-20 20:53:20 +01:00
parent dd0f3cd167
commit 5383190518
5 changed files with 42 additions and 0 deletions
+28
View File
@@ -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;
}
}