#include <ContentWithAttributes.h>
TSP-enforcing: No
Definition at line 28 of file ContentWithAttributes.h.
Public Member Functions | |
CPKIFContentWithAttributes () | |
virtual | ~CPKIFContentWithAttributes () |
bool | Decoded () const |
CPKIFBufferPtr | Encode () |
void | Decode (CPKIFBufferPtr &buf) |
void | SetContentInfo (CPKIFContentInfoPtr &contentList) |
CPKIFContentInfoPtr | GetContentInfo () const |
void | GetAttributes (CPKIFAttributeList &sal) |
void | AddAttribute (CPKIFAttributePtr &sa) |
template<class T> | |
boost::shared_ptr< T > | GetAttribute () |
void | GetEncodedAttributes (CPKIFBufferPtr &buf) |
void | _GetAttributes (std::vector< CPKIFAttributePtr > &attrVector) |
virtual void | GetAddedAttributes (std::vector< CPKIFAttributePtr > &attr) |
CPKIFContentWithAttributes::CPKIFContentWithAttributes | ( | ) |
Interface: External
Default constructor. Applications only use the default constructor when creating CPKIFContentWithAttributes objects.
Definition at line 51 of file ContentWithAttributes.cpp.
References g_contentWithAttributes, and CPKIFContentType::SetContentType().
CPKIFContentWithAttributes::~CPKIFContentWithAttributes | ( | ) | [virtual] |
Interface: External
This function destroys an instance of CPKIFContentWithAttributes object.
Definition at line 121 of file ContentWithAttributes.cpp.
bool CPKIFContentWithAttributes::Decoded | ( | ) | const |
Interface: External
Whether a SignerInfo object has been decoded from an encoded SignerInfo or has been constructed. This function is not typically used by applications.
True | if SignerInfo object has been decoded from an encoded SignerInfo | |
False | SignerInfo object has been constructed |
Definition at line 136 of file ContentWithAttributes.cpp.
CPKIFBufferPtr CPKIFContentWithAttributes::Encode | ( | ) | [virtual] |
Interface: External
This function encodes contentwithattributes
Implements CPKIFContentType.
Definition at line 278 of file ContentWithAttributes.cpp.
References COMMON_NOT_IMPLEMENTED, and RAISE_MESSAGE_EXCEPTION.
void CPKIFContentWithAttributes::Decode | ( | CPKIFBufferPtr & | siBuf | ) | [virtual] |
Interface: External
This constructor is invoked internally when parsing a CMS SignedData message (it is not invoked by applications); this version will throw a std::bad_alloc exception if allocation of memory to hold the encoded attribute value fails and an exception indicating ASN.1 decoding errors if any SignerInfo component fails to parse.
siBuf | [in] Reference to a ContentWithAttributes structure containing information to use to populate a new instance of CPKIFContentWithAttributes |
Implements CPKIFContentType.
Definition at line 67 of file ContentWithAttributes.cpp.
References CACASNWRAPPER_CREATE, and data.
void CPKIFContentWithAttributes::SetContentInfo | ( | CPKIFContentInfoPtr & | contentInfo | ) |
Interface: External
This function sets the content info for the contentwithattributes object
contentInfo | [in] A smart pointer to CPKIFContentInfo object |
Definition at line 254 of file ContentWithAttributes.cpp.
CPKIFContentInfoPtr CPKIFContentWithAttributes::GetContentInfo | ( | ) | const |
Interface: External
This function retrives the content info for the contentwithattributes object
Definition at line 267 of file ContentWithAttributes.cpp.
void CPKIFContentWithAttributes::GetAttributes | ( | CPKIFAttributeList & | ual | ) |
Interface: External
This functions are used to get the unsigned attributes associated with a SignerInfo object.
ual | [out] A list of the unsigned attributes. |
Definition at line 148 of file ContentWithAttributes.cpp.
References IPKIFHasAttributes::GetAttributes(), and CPKIFCMSAttributeMediator2::GetInstance().
void CPKIFContentWithAttributes::AddAttribute | ( | CPKIFAttributePtr & | ua | ) |
Interface: External
This functions are used to add the unsigned attributes associated with a SignerInfo object.
CPKIFMessageException(COMMON_INVALID_INPUT) |
ua | [in] An attribute to add to the unsigned attributes. |
Definition at line 168 of file ContentWithAttributes.cpp.
References COMMON_INVALID_INPUT, and TOOLKIT_MESSAGE.
boost::shared_ptr< T > CPKIFContentWithAttributes::GetAttribute | ( | ) | [inline] |
Interface: External
This function is used to get the unsigned attributes associated with a SignerInfo object.
Definition at line 84 of file ContentWithAttributes.h.
References _GetAttributes().
void CPKIFContentWithAttributes::GetEncodedAttributes | ( | CPKIFBufferPtr & | buf | ) | [virtual] |
Interface: External
This function retrives a list of DER encoded signed CMS attributes
buf | [out] A reference to a smart pointer to CPKIFBuffer object containing the DER encoded list of CMS attributes |
Reimplemented from IPKIFHasAttributes.
Definition at line 99 of file ContentWithAttributes.cpp.
void CPKIFContentWithAttributes::_GetAttributes | ( | std::vector< CPKIFAttributePtr > & | attrVector | ) |
Interface: Subsystem
This functions are used to get the signed attributes associated with a SignerInfo object.
attrVector | [out] A vector of CPKIFAttribute objects |
Definition at line 222 of file ContentWithAttributes.cpp.
References IPKIFHasAttributes::GetAttributes(), and CPKIFCMSAttributeMediator2::GetInstance().
Referenced by GetAttribute().
void CPKIFContentWithAttributes::GetAddedAttributes | ( | std::vector< CPKIFAttributePtr > & | attr | ) | [virtual] |
Interface: External
This functions are used to get the added signed attributes associated with a SignerInfo object.
attr | [out] A vector of CPKIFAttribute objects |
Reimplemented from IPKIFHasAttributes.
Definition at line 236 of file ContentWithAttributes.cpp.