Botan 1.10.17
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
13namespace Botan {
14
15namespace 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*/
22BOTAN_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*/
29BOTAN_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*/
36BOTAN_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*/
44BOTAN_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*/
52BOTAN_DLL bool name_of(const OID& oid, const std::string& name);
53
54}
55
56}
57
58#endif
std::string lookup(const OID &oid)
Definition oids.cpp:31
bool name_of(const OID &oid, const std::string &name)
Definition oids.cpp:69
bool have_oid(const std::string &name)
Definition oids.cpp:61
void add_oid(const OID &oid, const std::string &name)
Definition oids.cpp:18