From 0c2c0a846d42b05b44d62a3c3fcaf410660f8a4d Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 30 Dec 2015 06:57:34 +0100 Subject: Cryptography: Optimize Whirlpool implementation by using public domain assembly code developed by Wei Dai --- src/Main/UserInterface.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Main/UserInterface.cpp') diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp index 2be5bc7e..1648d94c 100644 --- a/src/Main/UserInterface.cpp +++ b/src/Main/UserInterface.cpp @@ -15,6 +15,7 @@ #include #include #include +#include "Crypto/cpu.h" #include "Platform/PlatformTest.h" #ifdef TC_UNIX #include @@ -504,6 +505,9 @@ namespace VeraCrypt SetAppName (Application::GetName()); SetClassName (Application::GetName()); +#ifdef CRYPTOPP_CPUID_AVAILABLE + DetectX86Features (); +#endif LangString.Init(); Core->Init(); @@ -834,10 +838,8 @@ namespace VeraCrypt #else // MIME handler for directory seems to be unavailable through wxWidgets wxString desktop = GetTraits()->GetDesktopEnvironment(); - bool xdgOpenPresent = wxFileName::IsFileExecutable (wxT("/usr/bin/xdg-open")); - bool nautilusPresent = wxFileName::IsFileExecutable (wxT("/usr/bin/nautilus")); - if (desktop == L"GNOME" || (desktop.empty() && !xdgOpenPresent && nautilusPresent)) + if (desktop == L"GNOME") { args.push_back ("--no-default-window"); args.push_back ("--no-desktop"); @@ -870,7 +872,7 @@ namespace VeraCrypt catch (exception &e) { ShowError (e); } } } - else if (xdgOpenPresent) + else if (wxFileName::IsFileExecutable (wxT("/usr/bin/xdg-open"))) { // Fallback on the standard xdg-open command // which is not always available by default -- cgit v1.2.3