diff options
Diffstat (limited to 'src/oids.cpp')
-rw-r--r-- | src/oids.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/oids.cpp b/src/oids.cpp index df6a09f94..4c56ff558 100644 --- a/src/oids.cpp +++ b/src/oids.cpp @@ -4,7 +4,7 @@ *************************************************/ #include <botan/oids.h> -#include <botan/libstate.h> +#include <botan/config.h> namespace Botan { @@ -17,10 +17,10 @@ void add_oid(const OID& oid, const std::string& name) { const std::string oid_str = oid.as_string(); - if(!global_state().option_set("oid2str", oid_str)) - global_state().set_option("oid2str", oid_str, name); - if(!global_state().option_set("str2oid", name)) - global_state().set_option("str2oid", name, oid_str); + if(!global_config().is_set("oid2str", oid_str)) + global_config().set("oid2str", oid_str, name); + if(!global_config().is_set("str2oid", name)) + global_config().set("str2oid", name, oid_str); } /************************************************* @@ -28,7 +28,7 @@ void add_oid(const OID& oid, const std::string& name) *************************************************/ std::string lookup(const OID& oid) { - return global_state().get_option("oid2str", oid.as_string()); + return global_config().get("oid2str", oid.as_string()); } /************************************************* @@ -36,7 +36,7 @@ std::string lookup(const OID& oid) *************************************************/ OID lookup(const std::string& name) { - return OID(global_state().get_option("str2oid", name)); + return OID(global_config().get("str2oid", name)); } /************************************************* @@ -44,7 +44,7 @@ OID lookup(const std::string& name) *************************************************/ bool have_oid(const std::string& name) { - return global_state().option_set("str2oid", name); + return global_config().is_set("str2oid", name); } } |