Main Page   Modules   Class Hierarchy   Compound List   File List   Compound 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 Methods

Constructors and Destructors
 DSIGSignedInfo (DOMDocument *doc, XSECSafeBufferFormatter *pFormatter, DOMNode *signedInfoNode, DSIGSignature *parentSignature)
 Constructor for existing nodes.

 DSIGSignedInfo (DOMDocument *doc, XSECSafeBufferFormatter *pFormatter, DSIGSignature *parentSignature)
 Constructor for building from scratch.

 ~DSIGSignedInfo ()
 Destructur.

Create and Set
void load (void)
 Load from DOM.

bool verify (safeBuffer &errStr)
 Verify the SignedInfo.

void hash (void)
 Hash the reference list.

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
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 DOMDocument *    doc,
XSECSafeBufferFormatter   pFormatter,
DOMNode *    signedInfoNode,
DSIGSignature   parentSignature
 

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
parentSignature  The signature that owns me

DSIGSignedInfo::DSIGSignedInfo DOMDocument *    doc,
XSECSafeBufferFormatter   pFormatter,
DSIGSignature   parentSignature
 

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
parentSignature  The owning Signature

DSIGSignedInfo::~DSIGSignedInfo  
 

Destructur.

Delete - but does not destroy the DOM Nodes


Member Function Documentation

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

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 Wed May 7 21:44:03 2003 for XML-Security-C by doxygen1.2.18