diff options
-rw-r--r-- | include/modules.h | 2 | ||||
-rw-r--r-- | src/modules.cpp | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/include/modules.h b/include/modules.h index f81fcb64a..f0855e4af 100644 --- a/include/modules.h +++ b/include/modules.h @@ -49,7 +49,7 @@ class Builtin_Modules : public Modules Builtin_Modules(const InitializerOptions&); private: - const bool should_lock; + const bool should_lock, use_engines; }; } diff --git a/src/modules.cpp b/src/modules.cpp index 47a62c13f..43d9d0f90 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -188,17 +188,20 @@ std::vector<Engine*> Builtin_Modules::engines() const { std::vector<Engine*> engines; + if(use_engines) + { #if defined(BOTAN_EXT_ENGINE_AEP) - engines.push_back(new AEP_Engine); + engines.push_back(new AEP_Engine); #endif #if defined(BOTAN_EXT_ENGINE_GNU_MP) - engines.push_back(new GMP_Engine); + engines.push_back(new GMP_Engine); #endif #if defined(BOTAN_EXT_ENGINE_OPENSSL) - engines.push_back(new OpenSSL_Engine); + engines.push_back(new OpenSSL_Engine); #endif + } engines.push_back(new Default_Engine); @@ -217,7 +220,8 @@ Charset_Transcoder* Builtin_Modules::transcoder() const * Builtin_Modules Constructor * *************************************************/ Builtin_Modules::Builtin_Modules(const InitializerOptions& args) : - should_lock(args.secure_memory()) + should_lock(args.secure_memory()), + use_engines(args.use_engines()) { } |