#include <Attribute.h>
TSP-enforcing: No
Definition at line 29 of file Attribute.h.
Public Member Functions | |
CPKIFAttribute () | |
CPKIFAttribute (const CPKIFOIDPtr &oid, const CPKIFBufferPtr &attr) | |
CPKIFAttribute (const CPKIFBufferPtr &attr) | |
virtual | ~CPKIFAttribute () |
void | SetOID (const CPKIFOIDPtr &oid) |
virtual CPKIFOIDPtr | GetOID () const |
void | AddValue (CPKIFBufferPtr &buf) |
virtual void | GetValues (CPKIFBufferList &values) const |
CPKIFAttribute::CPKIFAttribute | ( | ) |
Interface: External
Default constructor
Definition at line 78 of file Attribute.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_MESSAGE_ASN.
CPKIFAttribute::CPKIFAttribute | ( | const CPKIFOIDPtr & | oid, | |
const CPKIFBufferPtr & | attr | |||
) |
Interface: External
This constructor is invoked when parsing a CMS message containing attributes; this version will throw a std::bad_alloc exception if allocation of memory to hold the encoded attribute value fails.
std::bad_alloc | Interface: External |
oid | [in] A reference to a smart pointer to CPKIFOID object which identifies the Attribute |
attr | [in[] A reference to a smart pointer to CPKIFBuffer object containing the attribute value |
Definition at line 118 of file Attribute.cpp.
References SetOID().
CPKIFAttribute::CPKIFAttribute | ( | const CPKIFBufferPtr & | attr | ) |
Interface: External
Constructor for CPKIFAttribute class
attr | [in[] A reference to a smart pointer to CPKIFBuffer object containing the attribute value |
Definition at line 137 of file Attribute.cpp.
CPKIFAttribute::~CPKIFAttribute | ( | ) | [virtual] |
Interface: External
This function is a virtual destructor to be overridden by subclasses.
Definition at line 153 of file Attribute.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_MESSAGE_ASN.
void CPKIFAttribute::SetOID | ( | const CPKIFOIDPtr & | oid | ) |
Interface: External
This function is used to set the OID identifying the type of attribute contained by the object. PKIF provides global objects containing the object identifier associated with most common CMS attributes.
If the oid parameter contains a NULL pointer when SetOID is invoked, a CPKIFMessageException with error code COMMON_INVALID_INPUT is thrown
CPKIFMessageException(COMMON_INVALID_INPUT) |
oid | [in] A reference to a smart pointer to a CPKIFOID object containing the object identifier that identifies the type of attribute |
Definition at line 177 of file Attribute.cpp.
References COMMON_INVALID_INPUT, LOG_STRING_DEBUG, TOOLKIT_MESSAGE, and TOOLKIT_MESSAGE_ASN.
Referenced by CPKIFAttribute().
CPKIFOIDPtr CPKIFAttribute::GetOID | ( | ) | const [virtual] |
Interface: External
This function is used to retrieve the OID identifying the type of attribute contained by the object. PKIF provides global objects containing the object identifier associated with most common CMS attributes.
Reimplemented in CPKIFBinarySigningTimeAttribute, CPKIFContentTypeAttribute, CPKIFCountersignatureAttribute, CPKIFMessageDigestAttribute, CPKIFSigningCertificateAttribute, CPKIFSigningTimeAttribute, and CPKIFTimestampAttribute.
Definition at line 198 of file Attribute.cpp.
void CPKIFAttribute::AddValue | ( | CPKIFBufferPtr & | buf | ) |
Interface: External
This function is used to set the value(s) of the attribute contained by the object. Not all attributes are permitted to have multiple values (none of the attributes for which classes have been provided with PKIF may have multiple values). When handling an unrecognized attribute, the DER-encoded value(s) of the attribute can be retrieved using GetValues.
If the buf parameter contains a NULL pointer when AddValue is invoked, a CPKIFMessageException with error code COMMON_INVALID_INPUT is thrown.
CPKIFMessageException(COMMON_INVALID_INPUT) |
buf | [in] An encoded value to add to the set of values associated with an attribute |
Reimplemented in CPKIFCountersignatureAttribute.
Definition at line 218 of file Attribute.cpp.
References COMMON_INVALID_INPUT, LOG_STRING_DEBUG, TOOLKIT_MESSAGE, and TOOLKIT_MESSAGE_ASN.
void CPKIFAttribute::GetValues | ( | CPKIFBufferList & | values | ) | const [virtual] |
Interface: External
This function is used to retrieve the value(s) of the attribute contained by the object. Not all attributes are permitted to have multiple values (none of the attributes for which classes have been provided with PKIF may have multiple values). When handling an unrecognized attribute, the DER-encoded value(s) of the attribute can be retrieved using GetValues.
values | [out] The list of values associated with an attribute |
Reimplemented in CPKIFBinarySigningTimeAttribute, CPKIFContentTypeAttribute, CPKIFCountersignatureAttribute, CPKIFMessageDigestAttribute, CPKIFSigningCertificateAttribute, CPKIFSigningTimeAttribute, and CPKIFTimestampAttribute.
Definition at line 240 of file Attribute.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_MESSAGE_ASN.