aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/init.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-25 22:52:00 +0000
committerlloyd <[email protected]>2012-05-25 22:52:00 +0000
commit12090a7148d9ee73572cc1a7268fc489504a8173 (patch)
tree51e50ce0852c56231e9e6dc13f168b10edd45d01 /src/libstate/init.cpp
parent9594979caf775dc4062850044715b804d1fda60c (diff)
parent65cc04445f8d40497f02a14bd8cb97081790e54b (diff)
propagate from branch 'net.randombit.botan.x509-path-validation' (head 63b5a20eab129ca13287fda33d2d02eec329708f)
to branch 'net.randombit.botan' (head 8b8150f09c55184f028f2929c4e7f7cd0d46d96e)
Diffstat (limited to 'src/libstate/init.cpp')
-rw-r--r--src/libstate/init.cpp39
1 files changed, 5 insertions, 34 deletions
diff --git a/src/libstate/init.cpp b/src/libstate/init.cpp
index 7cdc615bd..2d724f366 100644
--- a/src/libstate/init.cpp
+++ b/src/libstate/init.cpp
@@ -1,12 +1,11 @@
/*
* Default Initialization Function
-* (C) 1999-2007 Jack Lloyd
+* (C) 1999-2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#include <botan/init.h>
-#include <botan/parsing.h>
#include <botan/libstate.h>
#include <botan/global_state.h>
@@ -15,48 +14,20 @@ namespace Botan {
/*
* Library Initialization
*/
-void LibraryInitializer::initialize(const std::string& arg_string)
+void LibraryInitializer::initialize(const std::string&)
{
- bool thread_safe = false;
-
- const std::vector<std::string> arg_list = split_on(arg_string, ' ');
- for(size_t i = 0; i != arg_list.size(); ++i)
- {
- if(arg_list[i].size() == 0)
- continue;
-
- std::string name, value;
-
- if(arg_list[i].find('=') == std::string::npos)
- {
- name = arg_list[i];
- value = "true";
- }
- else
- {
- std::vector<std::string> name_and_value = split_on(arg_list[i], '=');
- name = name_and_value[0];
- value = name_and_value[1];
- }
-
- bool is_on =
- (value == "1" || value == "true" || value == "yes" || value == "on");
-
- if(name == "thread_safe")
- thread_safe = is_on;
- }
try
{
/*
This two stage initialization process is because Library_State's
constructor will implicitly refer to global state through the
- allocators and so for, so global_state() has to be a valid
+ allocators and so forth, so global_state() has to be a valid
reference before initialize() can be called. Yeah, gross.
*/
Global_State_Management::set_global_state(new Library_State);
- global_state().initialize(thread_safe);
+ global_state().initialize();
}
catch(...)
{
@@ -70,7 +41,7 @@ void LibraryInitializer::initialize(const std::string& arg_string)
*/
void LibraryInitializer::deinitialize()
{
- Global_State_Management::set_global_state(0);
+ Global_State_Management::set_global_state(nullptr);
}
}