CPKIFAlgorithmIdentifier Class Reference

#include <AlgorithmIdentifier.h>

Collaboration diagram for CPKIFAlgorithmIdentifier:

Collaboration graph
[legend]

List of all members.


Detailed Description

CPKIFAlgorithmIdentifier objects provide access to information contained in algorithm identifier objects, as defined in the X.509 specification. The information includes an object identifier that indicates the algorithm and, optionally, parameters associated with the algorithm. The ASN.1 definition used by PKIF is given below:
AlgorithmIdentifier ::= SEQUENCE 
{
    algorithm   ALGORITHM.&id ({SupportedAlgorithms}),
    parameters  ALGORITHM.&Type ({SupportedAlgorithms}{@algorithm}) OPTIONAL 
}

This class is generally used to review algorithm details specified in PKI-related objects such as public key certificates and CRLs. For example, an instance of CPKIFAlgorithmIdentifier can be retrieved from a certificate by invoking the SignatureAlgorithm on an instance of CPKIFCertificate.

TSP-enforcing: Yes

Definition at line 43 of file AlgorithmIdentifier.h.


Public Member Functions

 CPKIFAlgorithmIdentifier ()
 CPKIFAlgorithmIdentifier (const CPKIFOIDPtr &oid, const CPKIFBufferPtr &params)
 CPKIFAlgorithmIdentifier (const CPKIFAlgorithmIdentifier &alg)
 CPKIFAlgorithmIdentifier (const CPKIFOIDPtr &oid)
virtual ~CPKIFAlgorithmIdentifier ()
CPKIFOIDPtr oid () const
bool hasParameters () const
CPKIFBufferPtr parameters () const
bool operator== (const CPKIFAlgorithmIdentifier &rhs) const

Constructor & Destructor Documentation

CPKIFAlgorithmIdentifier::CPKIFAlgorithmIdentifier (  ) 

Interface: External

CPKIFAlgorithmIdentifier has three constructor forms. The only constructor that takes a reference to a CACX509V3AlgorithmIdentifier permits the parameters to be set at construction time. The other two versions initialize the parameters property to NULL. The constructor version that takes a CPKIFOIDPtr will accept references to a NULL pointer.

Returns:
None

Definition at line 42 of file AlgorithmIdentifier.cpp.

CPKIFAlgorithmIdentifier::CPKIFAlgorithmIdentifier ( const CPKIFOIDPtr &  oid,
const CPKIFBufferPtr &  params 
)

Interface: External

CPKIFAlgorithmIdentifier has three constructor forms. The only constructor that takes a reference to a CACX509V3AlgorithmIdentifier permits the parameters to be set at construction time. The other two versions initialize the parameters property to NULL. The constructor version that takes a CPKIFOIDPtr will accept references to a NULL pointer.

Returns:
None
Parameters:
oid  [in] A reference to a smart pointer to CPKIFOID objetc containing the Alg oid
params  [in] A reference to a smart pointer to CPKIFBuffer object that contains optional parameters

Definition at line 58 of file AlgorithmIdentifier.cpp.

CPKIFAlgorithmIdentifier::CPKIFAlgorithmIdentifier ( const CPKIFAlgorithmIdentifier alg  ) 

Interface: External

Copy constructor

Returns:
None
Parameters:
alg  [in] Reference to CPKIFAlgorithmIdentifier object

Definition at line 102 of file AlgorithmIdentifier.cpp.

References m_impl.

CPKIFAlgorithmIdentifier::CPKIFAlgorithmIdentifier ( const CPKIFOIDPtr &  oid  ) 

Interface: External

CPKIFAlgorithmIdentifier has three constructor forms. The only constructor that takes a reference to a CACX509V3AlgorithmIdentifier permits the parameters to be set at construction time. The other two versions initialize the parameters property to NULL. The constructor version that takes a CPKIFOIDPtr will accept references to a NULL pointer.

Returns:
None
Parameters:
oid  [in] Reference to a smart pointer to a CPKIFOID object containing the OID that identifies the algorithm

Definition at line 88 of file AlgorithmIdentifier.cpp.

CPKIFAlgorithmIdentifier::~CPKIFAlgorithmIdentifier (  )  [virtual]

Interface: External

The function destroys an instance of CPKIFAlgorithmIdentifier.

Returns:
None

Definition at line 127 of file AlgorithmIdentifier.cpp.


Member Function Documentation

CPKIFOIDPtr CPKIFAlgorithmIdentifier::oid (  )  const

Interface: External

This function returns a smart pointer to a CPKIFOID object containing the object identifier that identifies the algorithm or NULL if no object identifier has been specified.

Returns:
Smart pointer to a CPKIFOID object containing the object identifier that identifies the algorithm.

Definition at line 154 of file AlgorithmIdentifier.cpp.

bool CPKIFAlgorithmIdentifier::hasParameters (  )  const

Interface: External

This function returns true if the value of the parameters property is non-NULL and false otherwise.

Returns:
true if the value of the parameters property is non-NULL and false otherwise

Definition at line 166 of file AlgorithmIdentifier.cpp.

Referenced by parameters().

CPKIFBufferPtr CPKIFAlgorithmIdentifier::parameters (  )  const

Interface: External

This function returns a smart pointer to a CPKIFBuffer object containing the DER-encoded parameters associated with an algorithm identifier object, if present, or NULL if no parameters are associated with an algorithm identifier object. The hasParameters method can be invoked prior to invoking this function to determine if parameters are available, i.e. the parameters property is non-NULL.

Returns:
Smart pointer to a CPKIFBuffer object containing the binary encoded parameters, or NULL if no parameters are associated with this algorithm identifier instance.

Definition at line 198 of file AlgorithmIdentifier.cpp.

References hasParameters().

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

Interface: External

The operator== function compares the OIDs contained by two CPKIFAlgorithmIdentifier objects. Neither the presence nor the value of parameters is factored into the comparison. If the OIDs match, this function returns true, otherwise false is returned.

Return values:
True if matches
Flase if does not match
Parameters:
rhs  [in] Reference to a CPKIFAlgorithmIdentifier object to compare

Definition at line 181 of file AlgorithmIdentifier.cpp.

References m_impl.


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

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