CPKIFName Class Reference

#include <Name.h>

Collaboration diagram for CPKIFName:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFName class provides an interface to distinguished name objects. This class is used to work with distinguished names that have been parsed from an encoded object. This class does not provide means of encoding distinguished names.

TSP-enforcing: No

Definition at line 28 of file Name.h.


Public Member Functions

 CPKIFName ()
 CPKIFName (const CPKIFBufferPtr &name)
virtual ~CPKIFName ()
const char * ToString ()
bool operator== (const CPKIFName &rhs) const
bool DescendedFrom (const CPKIFName &name) const
int RDNCount () const
void GetRDNs (std::vector< std::string > &rdns) const
CPKIFBufferPtr Encoded ()
CPKIFBufferPtr rawName ()

Friends

class CPKIFDistributionPointName

Constructor & Destructor Documentation

CPKIFName::CPKIFName (  ) 

Interface: External

Default constructor

Returns:
None

Definition at line 36 of file Name.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_X509_ASN.

CPKIFName::CPKIFName ( const CPKIFBufferPtr &  name  ) 

Interface: External

This constructor is invoked when parsing a distinguished name; this version will throw a std::bad_alloc exception if allocation of memory fails or ASN.1 decoding errors if the name form cannot be parsed.

Returns:
None
Exceptions:
std::bad_alloc 
Parameters:
name  [in] Reference to a smart pointer to CPKIFBuffer used to populate an instance of CPKIFName

Definition at line 116 of file Name.cpp.

References CACASNWRAPPER_CREATE, LOG_STRING_DEBUG, NEW_NEXT_AND_ADVANCE, NEW_NODE, and TOOLKIT_X509_ASN.

CPKIFName::~CPKIFName (  )  [virtual]

Interface: External

The function destroys an instance of CPKIFName.

Returns:
None

Definition at line 193 of file Name.cpp.

References LOG_STRING_DEBUG, and TOOLKIT_X509_ASN.


Member Function Documentation

const char * CPKIFName::ToString (  ) 

Interface: External

This function returns a string representation of the distinguished name as a const char* to a NULL-terminated buffer. The buffer is only valid for the life to the associated CPKIFName object. Thus, if the string value is required for a longer period, it should be copied into an application-owned buffer.

Returns:
A string representation of the distinguished name as a const char* to a NULL-terminated buffer.
Exceptions:
CPKIFException("Unsupported name form for string conversion")

Definition at line 359 of file Name.cpp.

References btoa(), CACASNWRAPPER_CREATE, FindAttributeName(), LOG_STRING_DEBUG, MAXOID, TOOLKIT_ASN, and TOOLKIT_X509_ASN.

Referenced by SimpleRootStore::GetTrustRoots().

bool CPKIFName::operator== ( const CPKIFName rhs  )  const

Interface: External

This function returns true if the CPKIFName object passed as a parameter contains a name value equal to the object on which the operator== function was invoked and false otherwise.

Returns:
True if the CPKIFName object passed as a parameter contains a name value equal to the object on which the operator== function was invoked and false otherwise.
Parameters:
rhs  Reference to a CPKIFName object containing the name value to compare

Definition at line 1002 of file Name.cpp.

References CACASNWRAPPER_CREATE, m_impl, and RDNsMatch().

bool CPKIFName::DescendedFrom ( const CPKIFName rhs  )  const

Interface: External

This function returns a Boolean indicating whether the distinguished name passed via the name parameter is descended from the name contained by the object on which this function is invoked.

Returns:
A Boolean indicating whether the distinguished name passed via the name parameter is descended from the name contained by the object on which this function is invoked.
Parameters:
rhs  [in] A refernce to CPKIFName onject

Definition at line 1046 of file Name.cpp.

References CACASNWRAPPER_CREATE, m_impl, and RDNsMatch().

int CPKIFName::RDNCount (  )  const

Interface: External

This function returns the number of RDNs in the distinguished name.

Returns:
The number of RDNs in the distinguished name.

Definition at line 1080 of file Name.cpp.

void CPKIFName::GetRDNs ( std::vector< std::string > &  rdns  )  const

Interface: External

This function returns a vector of strings. Each string represents an RDN component. The components are returned in reverse order of how they appear in the certificate.

Returns:
N/A

Definition at line 1097 of file Name.cpp.

References CACASNWRAPPER_CREATE, FindAttributeName(), LOG_STRING_DEBUG, MAXOID, TOOLKIT_ASN, and TOOLKIT_X509_ASN.

CPKIFBufferPtr CPKIFName::Encoded (  ) 

Interface: External

This function returns the encoded distinguished name as a reference counted smart pointer to a CPKIFBuffer object. Thus, altering the buffer that is returned will result in this function returning the altered value upon future calls.

Returns:
The encoded distinguished name as a reference counted smart pointer to a CPKIFBuffer object.

Definition at line 228 of file Name.cpp.

References CACASNWRAPPER_CREATE, LOG_STRING_DEBUG, and TOOLKIT_X509_ASN.

CPKIFBufferPtr CPKIFName::rawName (  ) 

Interface: External

This internally used function returns a pointer to a CACX509V3Name structure containing the information that comprises the distinguished name associated with an instance of CPKIFName. The structure lifetime equals that of the associated CPKIFName object.

Returns:
A pointer to a CACX509V3Name structure containing the information that comprises the distinguished name associated with an instance of CPKIFName.

Definition at line 271 of file Name.cpp.

References CACASNWRAPPER_CREATE, LOG_STRING_DEBUG, and TOOLKIT_X509_ASN.


Friends And Related Function Documentation

friend class CPKIFDistributionPointName [friend]

Definition at line 30 of file Name.h.


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

Generated on Mon Nov 15 11:20:26 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6