mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Linux: Disable Kernel crypto if volume encrypted using Kuznyechik or Magma
This commit is contained in:
@@ -303,9 +303,12 @@ namespace VeraCrypt
|
|||||||
void CoreLinux::MountVolumeNative (shared_ptr <Volume> volume, MountOptions &options, const DirectoryPath &auxMountPoint) const
|
void CoreLinux::MountVolumeNative (shared_ptr <Volume> volume, MountOptions &options, const DirectoryPath &auxMountPoint) const
|
||||||
{
|
{
|
||||||
bool xts = (typeid (*volume->GetEncryptionMode()) == typeid (EncryptionModeXTS));
|
bool xts = (typeid (*volume->GetEncryptionMode()) == typeid (EncryptionModeXTS));
|
||||||
|
bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (GOST89))
|
||||||
|
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik));
|
||||||
|
|
||||||
if (options.NoKernelCrypto
|
if (options.NoKernelCrypto
|
||||||
|| !xts
|
|| !xts
|
||||||
|
|| algoNotSupported
|
||||||
|| volume->GetProtectionType() == VolumeProtection::HiddenVolumeReadOnly)
|
|| volume->GetProtectionType() == VolumeProtection::HiddenVolumeReadOnly)
|
||||||
{
|
{
|
||||||
throw NotApplicable (SRC_POS);
|
throw NotApplicable (SRC_POS);
|
||||||
|
|||||||
Reference in New Issue
Block a user