Botan  1.10.9
oids.h
Go to the documentation of this file.
1 /*
2 * OID Registry
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7 
8 #ifndef BOTAN_OIDS_H__
9 #define BOTAN_OIDS_H__
10 
11 #include <botan/asn1_oid.h>
12 
13 namespace Botan {
14 
15 namespace OIDS {
16 
17 /**
18 * Register an OID to string mapping.
19 * @param oid the oid to register
20 * @param name the name to be associated with the oid
21 */
22 BOTAN_DLL void add_oid(const OID& oid, const std::string& name);
23 
24 /**
25 * See if an OID exists in the internal table.
26 * @param oid the oid to check for
27 * @return true if the oid is registered
28 */
29 BOTAN_DLL bool have_oid(const std::string& oid);
30 
31 /**
32 * Resolve an OID
33 * @param oid the OID to look up
34 * @return name associated with this OID
35 */
36 BOTAN_DLL std::string lookup(const OID& oid);
37 
38 /**
39 * Find the OID to a name. The lookup will be performed in the
40 * general OID section of the configuration.
41 * @param name the name to resolve
42 * @return OID associated with the specified name
43 */
44 BOTAN_DLL OID lookup(const std::string& name);
45 
46 /**
47 * Tests whether the specified OID stands for the specified name.
48 * @param oid the OID to check
49 * @param name the name to check
50 * @return true if the specified OID stands for the specified name
51 */
52 BOTAN_DLL bool name_of(const OID& oid, const std::string& name);
53 
54 }
55 
56 }
57 
58 #endif
bool name_of(const OID &oid, const std::string &name)
Definition: oids.cpp:69
std::string lookup(const OID &oid)
Definition: oids.cpp:31
void add_oid(const OID &oid, const std::string &name)
Definition: oids.cpp:18
bool have_oid(const std::string &name)
Definition: oids.cpp:61
OID oid
Definition: x509_ext.cpp:446