aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/oid_lookup/oids.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-03-30 18:27:18 +0000
committerlloyd <[email protected]>2009-03-30 18:27:18 +0000
commit96d6eb6f29c55e16a37cf11899547886f735b065 (patch)
tree9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/libstate/oid_lookup/oids.cpp
parent3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (diff)
Thomas Moschny passed along a request from the Fedora packagers which came
up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
Diffstat (limited to 'src/libstate/oid_lookup/oids.cpp')
-rw-r--r--src/libstate/oid_lookup/oids.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/libstate/oid_lookup/oids.cpp b/src/libstate/oid_lookup/oids.cpp
index 0823625ea..232c63360 100644
--- a/src/libstate/oid_lookup/oids.cpp
+++ b/src/libstate/oid_lookup/oids.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* OID Registry Source File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
+/*
+* OID Registry
+* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/oids.h>
#include <botan/libstate.h>
@@ -10,9 +12,9 @@ namespace Botan {
namespace OIDS {
-/*************************************************
-* Register an OID to string mapping *
-*************************************************/
+/*
+* Register an OID to string mapping
+*/
void add_oid(const OID& oid, const std::string& name)
{
const std::string oid_str = oid.as_string();
@@ -23,9 +25,9 @@ void add_oid(const OID& oid, const std::string& name)
global_state().set("str2oid", name, oid_str);
}
-/*************************************************
-* Do an OID to string lookup *
-*************************************************/
+/*
+* Do an OID to string lookup
+*/
std::string lookup(const OID& oid)
{
std::string name = global_state().get("oid2str", oid.as_string());
@@ -34,9 +36,9 @@ std::string lookup(const OID& oid)
return name;
}
-/*************************************************
-* Do a string to OID lookup *
-*************************************************/
+/*
+* Do a string to OID lookup
+*/
OID lookup(const std::string& name)
{
std::string value = global_state().get("str2oid", name);
@@ -53,17 +55,17 @@ OID lookup(const std::string& name)
}
}
-/*************************************************
-* Check to see if an OID exists in the table *
-*************************************************/
+/*
+* Check to see if an OID exists in the table
+*/
bool have_oid(const std::string& name)
{
return global_state().is_set("str2oid", name);
}
-/*************************************************
-* Check to see if an OID exists in the table *
-*************************************************/
+/*
+* Check to see if an OID exists in the table
+*/
bool name_of(const OID& oid, const std::string& name)
{
return (oid == lookup(name));