class Akenti::DistinguishedName

This is a class to hold a Distinguished Name as a set of name and value pairs.

Public Methods

[more] DistinguishedName (const string& dn = "/CN=NO_NAME")
Constructs this object from the input distinguishedName string.
[more] ~DistinguishedName ()
Deletes this object
[more]bool containsAttributeValue (const string& attribute, const string& value) const
Checks to see if the pair of exits.
[more]const string& getValue (const string& attribute) const
Returns the value of the pair of specified by attribute.
[more]vector<string> getValues (const string& attribute)
Returns the vector with values corresponding to the attribute.
[more]bool containsAttribute (const string& attribute) const
Returns true if the specified attribute exists in this DistinguishName
[more]bool containsValue (const string& value) const
Returns true if the specified value exists in the pair of
[more]int numOfOcurrences (const string& attribute) const
Returns the number of ocurrences of the specified attribute.
[more]int size () const
Returns the size of the vector pairs
[more]bool hasMorePairs (int index) const
Returns true if the specified index is in pairs' range
[more]const pair<string, string> & getPairAt (int index) const
Returns the pair of by specified index.
[more]string toString () const
[more]string paramString () const
Returns a string representation for DistinguishedName which is used for debugging purposes.
[more]string toLogString () const
For logging purposes
[more]bool operator== (const DistinguishedName& dn) const
Is true if the DN's are identical: same pairs, same values in the same order.


Documentation

This is a class to hold a Distinguished Name as a set of name and value pairs. A Distinguished Name is a multi-component name used in X5.09 certifificate to uniquely identify an entity. Examples of attributes are listed below.
  * commonName                   "CN"
  * user ID                      "UID"
  * countryName                  "C"
  * localityName                 "L"
  * Email Address                "E"
  * stateOrProvinceName          "ST"
  * organizationName             "O"
  * organizationalUnitName       "OU"
  * 
Some of the attributes may have more than one value. And we allow user defined attributes

o DistinguishedName(const string& dn = "/CN=NO_NAME")
Constructs this object from the input distinguishedName string. The format of the string is /NAME1=value1/NAME2=value2...

Throws:
ParsingException if unable to parse DN

o ~DistinguishedName()
Deletes this object

obool containsAttributeValue(const string& attribute, const string& value) const
Checks to see if the pair of exits.

Parameters:
attribute - name(s) or component
value - the value of the name(s) or component
Returns:
ture if pair of exits, false otherwise

oconst string& getValue(const string& attribute) const
Returns the value of the pair of specified by attribute.

Throws:
Exception if the value can not be found for the specified attribute
Parameters:
attribute -

ovector<string> getValues(const string& attribute)
Returns the vector with values corresponding to the attribute. If there are no values for the attribute, the vector will not have any entries.

Throws:
Exception no value found for the attribute
Parameters:
attribute -
Returns:
a vector of values corresponding to the specified attribute

obool containsAttribute(const string& attribute) const
Returns true if the specified attribute exists in this DistinguishName

obool containsValue(const string& value) const
Returns true if the specified value exists in the pair of

oint numOfOcurrences(const string& attribute) const
Returns the number of ocurrences of the specified attribute.

Parameters:
attribute -

oint size() const
Returns the size of the vector pairs

obool hasMorePairs(int index) const
Returns true if the specified index is in pairs' range

oconst pair<string, string> & getPairAt(int index) const
Returns the pair of by specified index.

ostring toString() const

ostring paramString() const
Returns a string representation for DistinguishedName which is used for debugging purposes.

Returns:
debugging info

ostring toLogString() const
For logging purposes

obool operator==(const DistinguishedName& dn) const
Is true if the DN's are identical: same pairs, same values in the same order.

Parameters:
dn - the DN that is used for comparison with this DN Returns true if equal. The order is observed but the attribute comparisons are not case sensitive.


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari Xiang Sun
Version:
1.1 00/05/01

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.