Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

DSIGSignedInfo Class Reference
[Main Signature API]

#include <DSIGSignedInfo.hpp>

Collaboration diagram for DSIGSignedInfo:

Collaboration graph
[legend]
List of all members.

Detailed Description

Constructs and holds a SignedInfo.

The <SignedInfo> node is the container for all the information that is signed. It contains the ReferenceList and information on the signature and canonicalisation method for the signature.

Generally this class should not be manipulated directly.


Public Member Functions

Constructors and Destructors
 DSIGSignedInfo (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XSECSafeBufferFormatter *pFormatter, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *signedInfoNode, const XSECEnv *env)
 Constructor for existing nodes.
 DSIGSignedInfo (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XSECSafeBufferFormatter *pFormatter, const XSECEnv *env)
 Constructor for building from scratch.
 ~DSIGSignedInfo ()
 Destructor.
Create and Set
void load (void)
 Load from DOM.
bool verify (safeBuffer &errStr)
 Verify the SignedInfo.
void hash (void)
 Hash the reference list.
XERCES_CPP_NAMESPACE_QUALIFIER
DOMElement * 
createBlankSignedInfo (canonicalizationMethod cm, signatureMethod sm, hashMethod hm)
 Create an empty SignedInfo.
DSIGReferencecreateReference (const XMLCh *URI, hashMethod hm, char *type)
 Create a reference to add to the SignedInfo.
Getter functions
XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode * 
getDOMNode (void)
 Get the node pointing to the top of the DOM fragment.
canonicalizationMethod getCanonicalizationMethod (void)
 Get the canonicalisation method.
hashMethod getHashMethod (void)
 Get the hash method.
signatureMethod getSignatureMethod (void)
 Get the signature method.
int getHMACOutputLength (void)
 Get HMAC length.
DSIGReferenceListgetReferenceList (void)
 Return the list of references.


Constructor & Destructor Documentation

DSIGSignedInfo::DSIGSignedInfo XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *  doc,
XSECSafeBufferFormatter pFormatter,
XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *  signedInfoNode,
const XSECEnv env
 

Constructor for existing nodes.

Called by the library to construct a SignedInfo in cases where the DOM Nodes exist and need to be loaded

Parameters:
doc The document containing the structure to be loaded
pFormatter A safeBuffer formatter that will translate to UTF-8
signedInfoNode The node at the top of the SignedInfo tree fragment
env Operating environment

DSIGSignedInfo::DSIGSignedInfo XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *  doc,
XSECSafeBufferFormatter pFormatter,
const XSECEnv env
 

Constructor for building from scratch.

Will set up the class in preparation for building the DOM structure

Parameters:
doc The document to use to construct
pFormatter Formatter to use to translate to UTF-8
env Operating environment

DSIGSignedInfo::~DSIGSignedInfo  ) 
 

Destructor.

Delete - but does not destroy the DOM Nodes


Member Function Documentation

XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* DSIGSignedInfo::createBlankSignedInfo canonicalizationMethod  cm,
signatureMethod  sm,
hashMethod  hm
 

Create an empty SignedInfo.

Creates the DOM structure for a SignedInfo

Builds the DOM structures and sets the control structures of the SignedInfo

Parameters:
cm The canonicalisation method to set the SignedInfo as
sm Signature Method to use
hm Hash method to use (for the SignedInfo, not the references)

DSIGReference* DSIGSignedInfo::createReference const XMLCh *  URI,
hashMethod  hm,
char *  type
 

Create a reference to add to the SignedInfo.

Called by DSIGSignature to create and enter a new reference element

Parameters:
URI What the reference references
hm Digest method to use for the reference
type Reference type

canonicalizationMethod DSIGSignedInfo::getCanonicalizationMethod void   ) 
 

Get the canonicalisation method.

Returns:
Canonicalisation method

XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* DSIGSignedInfo::getDOMNode void   ) 
 

Get the node pointing to the top of the DOM fragment.

Returns:
the SignedInfo node

hashMethod DSIGSignedInfo::getHashMethod void   ) 
 

Get the hash method.

Returns:
the Hash (digest) Method

int DSIGSignedInfo::getHMACOutputLength void   ) 
 

Get HMAC length.

HMAC signatures can be truncated to a nominated length. This returns the length used.

DSIGReferenceList* DSIGSignedInfo::getReferenceList void   )  [inline]
 

Return the list of references.

Returns a pointer to the object holding the references contained in the SignedInfo

signatureMethod DSIGSignedInfo::getSignatureMethod void   ) 
 

Get the signature method.

Returns:
the Signature method

void DSIGSignedInfo::hash void   ) 
 

Hash the reference list.

Goes through each reference in the SignedInfo (including referenced manifests), performs the digest operation and adds the digest to the reference element

void DSIGSignedInfo::load void   ) 
 

Load from DOM.

Load the SignedInfo from the DOM Document

Does not do any verification of signatures or references - simply loads the values

bool DSIGSignedInfo::verify safeBuffer errStr  ) 
 

Verify the SignedInfo.

Validates each reference contained in the SignedInfo. Does not validate the signature itself - this is done by DSIGSignature

Parameters:
errStr The safeBuffer that error messages should be written to.


The documentation for this class was generated from the following file:
Generated on Sun Jul 3 17:41:21 2005 for XML-Security-C by  doxygen 1.4.2