aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/libstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstate/libstate.cpp')
-rw-r--r--src/libstate/libstate.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp
index 1b09a21ee..1a980b95f 100644
--- a/src/libstate/libstate.cpp
+++ b/src/libstate/libstate.cpp
@@ -278,35 +278,33 @@ void Library_State::initialize(bool thread_safe)
load_default_config();
- std::vector<Engine*> engines;
+ m_algorithm_factory = new Algorithm_Factory(*mutex_factory);
#if defined(BOTAN_HAS_ENGINE_GNU_MP)
- engines.push_back(new GMP_Engine);
+ algorithm_factory().add_engine(new GMP_Engine);
#endif
#if defined(BOTAN_HAS_ENGINE_OPENSSL)
- engines.push_back(new OpenSSL_Engine);
+ algorithm_factory().add_engine(new OpenSSL_Engine);
#endif
#if defined(BOTAN_HAS_ENGINE_AES_ISA)
- engines.push_back(new AES_ISA_Engine);
+ algorithm_factory().add_engine(new AES_ISA_Engine);
#endif
#if defined(BOTAN_HAS_ENGINE_SIMD)
- engines.push_back(new SIMD_Engine);
+ algorithm_factory().add_engine(new SIMD_Engine);
#endif
#if defined(BOTAN_HAS_ENGINE_AMD64_ASSEMBLER)
- engines.push_back(new AMD64_Assembler_Engine);
+ algorithm_factory().add_engine(new AMD64_Assembler_Engine);
#endif
#if defined(BOTAN_HAS_ENGINE_IA32_ASSEMBLER)
- engines.push_back(new IA32_Assembler_Engine);
+ algorithm_factory().add_engine(new IA32_Assembler_Engine);
#endif
- engines.push_back(new Default_Engine);
-
- m_algorithm_factory = new Algorithm_Factory(engines, *mutex_factory);
+ algorithm_factory().add_engine(new Default_Engine);
#if defined(BOTAN_HAS_SELFTESTS)
confirm_startup_self_tests(algorithm_factory());