diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/init_def.cpp | 1 | ||||
-rw-r--r-- | src/libstate.cpp | 1 | ||||
-rw-r--r-- | src/modules.cpp | 9 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/init_def.cpp b/src/init_def.cpp index 2edd43b97..efb23d439 100644 --- a/src/init_def.cpp +++ b/src/init_def.cpp @@ -55,7 +55,6 @@ void initialize(const std::string& arg_string) global_config().load_inifile(args.config_file()); global_state().load(modules); - global_state().set_transcoder(new Default_Charset_Transcoder); global_state().set_prng(new ANSI_X931_RNG); const u32bit min_entropy = diff --git a/src/libstate.cpp b/src/libstate.cpp index dd81342bc..d59d87be7 100644 --- a/src/libstate.cpp +++ b/src/libstate.cpp @@ -300,6 +300,7 @@ Config& Library_State::config() const void Library_State::load(Modules& modules) { set_timer(modules.timer()); + set_transcoder(modules.transcoder()); std::vector<Allocator*> allocators = modules.allocators(); diff --git a/src/modules.cpp b/src/modules.cpp index 92a5c8e75..48b043afe 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -5,6 +5,7 @@ #include <botan/modules.h> #include <botan/defalloc.h> +#include <botan/def_char.h> #include <botan/eng_def.h> #include <botan/es_file.h> @@ -204,4 +205,12 @@ std::vector<Engine*> Builtin_Modules::engines() const return engines; } +/************************************************* +* Find the best transcoder option * +*************************************************/ +Charset_Transcoder* Builtin_Modules::transcoder() const + { + return new Default_Charset_Transcoder; + } + } |