Ice 3.7 C++11 API Reference
Public Member Functions | Friends | List of all members
IceSSL::DistinguishedName Class Reference

This class represents a DistinguishedName, similar to the Java type X500Principal and the .NET type X500DistinguishedName. More...

#include <IceSSL/IceSSL.h>

Public Member Functions

 DistinguishedName (const std::list< std::pair< std::string, std::string > > &)
 Creates a DistinguishedName from a list of RDN pairs, where each pair consists of the RDN's type and value. More...
 
 DistinguishedName (const std::string &name)
 Creates a DistinguishedName from a string encoded using the rules in RFC2253. More...
 
bool match (const DistinguishedName &dn) const
 Performs a partial match with another DistinguishedName. More...
 
bool match (const std::string &dn) const
 Performs a partial match with another DistinguishedName. More...
 

Friends

bool operator< (const DistinguishedName &, const DistinguishedName &)
 Performs an exact match. More...
 
bool operator== (const DistinguishedName &, const DistinguishedName &)
 Performs an exact match. More...
 

Detailed Description

This class represents a DistinguishedName, similar to the Java type X500Principal and the .NET type X500DistinguishedName.

For comparison purposes, the value of a relative distinguished name (RDN) component is always unescaped before matching, therefore "ZeroC, Inc." will match ZeroC\, Inc.

toString() always returns exactly the same information as was provided in the constructor (i.e., "ZeroC, Inc." will not turn into ZeroC\, Inc.).

Constructor & Destructor Documentation

◆ DistinguishedName() [1/2]

IceSSL::DistinguishedName::DistinguishedName ( const std::string &  name)
explicit

Creates a DistinguishedName from a string encoded using the rules in RFC2253.

Parameters
nameThe encoded distinguished name.
Exceptions
ParseExceptionif parsing fails.

◆ DistinguishedName() [2/2]

IceSSL::DistinguishedName::DistinguishedName ( const std::list< std::pair< std::string, std::string > > &  )
explicit

Creates a DistinguishedName from a list of RDN pairs, where each pair consists of the RDN's type and value.

For example, the RDN "O=ZeroC" is represented by the pair ("O", "ZeroC").

Exceptions
ParseExceptionif parsing fails.

Member Function Documentation

◆ match() [1/2]

bool IceSSL::DistinguishedName::match ( const DistinguishedName dn) const

Performs a partial match with another DistinguishedName.

Parameters
dnThe name to be matched.
Returns
True if all of the RDNs in the argument are present in this DistinguishedName and they have the same values.

◆ match() [2/2]

bool IceSSL::DistinguishedName::match ( const std::string &  dn) const

Performs a partial match with another DistinguishedName.

Parameters
dnThe name to be matched.
Returns
True if all of the RDNs in the argument are present in this DistinguishedName and they have the same values.

Friends And Related Function Documentation

◆ operator<

bool operator< ( const DistinguishedName ,
const DistinguishedName  
)
friend

Performs an exact match.

The order of the RDN components is important.

◆ operator==

bool operator== ( const DistinguishedName ,
const DistinguishedName  
)
friend

Performs an exact match.

The order of the RDN components is important.


The documentation for this class was generated from the following file: