diff options
Diffstat (limited to 'src/Core/Unix/Linux/CoreLinux.cpp')
-rw-r--r-- | src/Core/Unix/Linux/CoreLinux.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp index 0840d243..5d5ba38f 100644 --- a/src/Core/Unix/Linux/CoreLinux.cpp +++ b/src/Core/Unix/Linux/CoreLinux.cpp @@ -22,6 +22,9 @@ #include "Platform/SystemInfo.h" #include "Platform/TextReader.h" #include "Volume/EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "Volume/EncryptionModeWolfCryptXTS.h" +#endif #include "Driver/Fuse/FuseService.h" #include "Core/Unix/CoreServiceProxy.h" @@ -302,13 +305,22 @@ namespace VeraCrypt void CoreLinux::MountVolumeNative (shared_ptr <Volume> volume, MountOptions &options, const DirectoryPath &auxMountPoint) const { - bool xts = (typeid (*volume->GetEncryptionMode()) == typeid (EncryptionModeXTS)); - bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (GOST89)) - || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik)); + bool xts = (typeid (*volume->GetEncryptionMode()) == + #ifdef WOLFCRYPT_BACKEND + typeid (EncryptionModeWolfCryptXTS)); + #else + typeid (EncryptionModeXTS)); + #endif + bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik)) + || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (CamelliaKuznyechik)) + || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikTwofish)) + || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikAES)) + || (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikSerpentCamellia)); if (options.NoKernelCrypto || !xts || algoNotSupported + || volume->IsEncryptionNotCompleted () || volume->GetProtectionType() == VolumeProtection::HiddenVolumeReadOnly) { throw NotApplicable (SRC_POS); @@ -484,6 +496,6 @@ namespace VeraCrypt } } - auto_ptr <CoreBase> Core (new CoreServiceProxy <CoreLinux>); - auto_ptr <CoreBase> CoreDirect (new CoreLinux); + unique_ptr <CoreBase> Core (new CoreServiceProxy <CoreLinux>); + unique_ptr <CoreBase> CoreDirect (new CoreLinux); } |