Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

XSECProvider Class Reference
[Main Signature API]

The provider class for XML Digital Signatures objects. More...

#include <XSECProvider.hpp>

Collaboration diagram for XSECProvider:

Collaboration graph
[legend]
List of all members.

Public Methods

Constructors and Destructors
 XSECProvider ()
 Default constructor. More...

 ~XSECProvider ()
Signature Creation Classes
DSIGSignaturenewSignatureFromDOM (DOMDocument *doc, DOMNode *sigNode)
 DSIGSignature creator for use with existing XML signatures or templates. More...

DSIGSignaturenewSignatureFromDOM (DOMDocument *doc)
 DSIGSignature creator for use with existing XML signatures or templates. More...

DSIGSignaturenewSignature (void)
 DSIGSignature creator for creating new XML signatures. More...

void releaseSignature (DSIGSignature *toRelease)
 Method for destroying DSIGSignature objects created via this provider. More...

Environmental Options
void setDefaultURIResolver (XSECURIResolver *resolver)
 Set the default URIResolver. More...


Detailed Description

The provider class for XML Digital Signatures objects.

The XSECProvider class is used to create and destroy signature objects. It provides a number of methods to create signature objects for a variety of situations - in particular creating an empty signature with which to create the signature DOM structure or creating a signature based on an already existing DOM structure.


Constructor & Destructor Documentation

XSECProvider::XSECProvider  
 

Default constructor.

The provider class requires no parameters for construction

XSECProvider::~XSECProvider  
 


Member Function Documentation

DSIGSignature* XSECProvider::newSignature void   
 

DSIGSignature creator for creating new XML signatures.

Create an empty DSIGSignature object that can be used to create new signature values. The returned signature object needs to be initialised with a document so a blank signature DOM structure can be created

See also:
DSIGSignature::createBlankSignature

DSIGSignature* XSECProvider::newSignatureFromDOM DOMDocument *    doc
 

DSIGSignature creator for use with existing XML signatures or templates.

Create a DSIGSignature object based on an already existing DSIG Signature XML node. It is assumed that the underlying DOM structure is in place and works correctly.

In this case, the XML-Security libraries will find the signature node.

Note:
The library will only find and use the first signature node in the document. If there are more, they will not be validated
Parameters:
doc  The DOM document node in which the signature is embedded.
See also:
DSIGSignature::load

DSIGSignature* XSECProvider::newSignatureFromDOM DOMDocument *    doc,
DOMNode *    sigNode
 

DSIGSignature creator for use with existing XML signatures or templates.

Create a DSIGSignature object based on an already existing DSIG Signature XML node. It is assumed that the underlying DOM structure is in place and works correctly.

In this case, the caller can pass in the signature DOM Node for cases where there may be more than one signature in a document. The caller needs to specify which signature tree is to be used.

Parameters:
doc  The DOM document node in which the signature is embedded.
sigNode  The DOM node (within doc) that is to be used as the base of the signature.
See also:
DSIGSignature::load

void XSECProvider::releaseSignature DSIGSignature   toRelease
 

Method for destroying DSIGSignature objects created via this provider.

The provider keeps track of all signature objects created during the lifetime of the provider. This method can be called to delete a signature whilst the provider is still in scope. Otherwise the objects will be automatically deleted when the provider object goes out of scope.

In cases where the DSIGSignature has been used to create a new DOM structure, it can be safely deleted once the signature operations have been completed without impacting the underlying DOM structure.

Parameters:
toRelease  The DSIGSignature object to be deleted.
Todo:
The DSIGSignature objects are fairly bulky in terms of creation and deletion. There should be a capability to store "released" objects in a re-use stack. At the moment the Provider class simply deletes the objects.
See also:
DSIGSignature::createBlankSignature

void XSECProvider::setDefaultURIResolver XSECURIResolver   resolver
 

Set the default URIResolver.

DSIGSignature objects require a URIResolver to allow them to de-reference URIs in reference elements.

This function sets the resolver that will be used for all signatures created after this is set. The resolver is cloned, so the object passed in can be safely deleted once the function has been completed.


The documentation for this class was generated from the following file:
Generated on Sat Jan 11 20:35:31 2003 for XML-Security-C by doxygen1.2.15