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

DSIGKeyInfoX509 Class Reference
[Main Signature API]

The class for <X509Data> nodes in a KeyInfo list. More...

#include <DSIGKeyInfoX509.hpp>

Inheritance diagram for DSIGKeyInfoX509:

Inheritance graph
[legend]
Collaboration diagram for DSIGKeyInfoX509:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< X509Holder * > X509ListType
typedef size_t size_type

Public Methods

Constructors and Destructors
 DSIGKeyInfoX509 (DSIGSignature *sig, DOMNode *X509Data)
 Constructor used when XML structures exist. More...

 DSIGKeyInfoX509 (DSIGSignature *sig)
 Constructor called when building XML structures. More...

virtual ~DSIGKeyInfoX509 ()
 Destructor. More...

Load function and get methods
virtual void load ()
 Function called to load an XML structure. More...

const char * getX509SubjectName (void)
 Get the name of the certificate. More...

safeBuffer getKeyName (void)
 Get the name of the certificate (interface function). More...

const char * getX509IssuerName (void)
 Get the IssuerSerialName. More...

const char * getX509IssuerSerialNumber (void)
 Get the IsserSerialNumber. More...

int getCertificateListSize (void)
 Find the number of certificates held. More...

const char * getCertificateItem (int item)
 Get the encoded certificate pointed to in the list. More...

virtual keyInfoType getKeyInfoType (void)
 Interface function to find the type of this KeyInfo. More...

Create and Set functions
DOMElement * createBlankX509Data (void)
 Create a new X509 data element. More...

void setX509SubjectName (const char *name)
 Set the X509SubjectName element in the KeyInfo element. More...

void setX509IssuerSerial (const char *name, const char *serial)
 Set the IssuerSerial element. More...

void appendX509Certificate (const char *base64Certificate)
 Add a certificate. More...


Detailed Description

The class for <X509Data> nodes in a KeyInfo list.

Class for holding information on a X509Data node as well as setting such a node in a signature.


Member Typedef Documentation

typedef size_t DSIGKeyInfoX509::size_type
 

typedef std::vector<X509Holder *> DSIGKeyInfoX509::X509ListType
 


Constructor & Destructor Documentation

DSIGKeyInfoX509::DSIGKeyInfoX509 DSIGSignature   sig,
DOMNode *    X509Data
 

Constructor used when XML structures exist.

Constructor called by DSIGSignature class when loading an X509Data element from DOM nodes.

Parameters:
sig  Calling signature
X509Data  DOMNode at start of data

DSIGKeyInfoX509::DSIGKeyInfoX509 DSIGSignature   sig
 

Constructor called when building XML structures.

Constructor called by DSIGSignature class when an XML structure is being built by a user calling the API

Parameters:
sig  Calling signature

virtual DSIGKeyInfoX509::~DSIGKeyInfoX509   [virtual]
 

Destructor.


Member Function Documentation

void DSIGKeyInfoX509::appendX509Certificate const char *    base64Certificate
 

Add a certificate.

Append an X509Certificate element to the list of certificates stored at the end of this KeyInfo element.

Parameters:
base64Certificate  A pointer to the base64 encoded certificate, exactly as it will appear in the XML structure.

DOMElement* DSIGKeyInfoX509::createBlankX509Data void   
 

Create a new X509 data element.

Create a blank (empty) X509Data element that can then be used by the application to add X509Data elements.

Returns:
A pointer to the new X509Data element.

const char* DSIGKeyInfoX509::getCertificateItem int    item
 

Get the encoded certificate pointed to in the list.

Use the index to find the required certificate and return a pointer to the buffer containing the encoded certificate.

Returns:
A pointer to the buffer containing the certificate or 0 if no certificate exists at that point in the list.

int DSIGKeyInfoX509::getCertificateListSize void   
 

Find the number of certificates held.

Find the number of certificates held in the X509Data structures.

Returns:
The number of certificates

virtual keyInfoType DSIGKeyInfoX509::getKeyInfoType void    [inline, virtual]
 

Interface function to find the type of this KeyInfo.

Implements DSIGKeyInfo.

safeBuffer DSIGKeyInfoX509::getKeyName void    [virtual]
 

Get the name of the certificate (interface function).

Get the name stored in the X509SubjectName element (if it exists).

Returns:
A safeBuffer containing the name

Implements DSIGKeyInfo.

const char* DSIGKeyInfoX509::getX509IssuerName void   
 

Get the IssuerSerialName.

Get the name of the Issuer (stored in the X509IssuerSerial element).

Returns:
A pointer to the char buffer containing the issuer name. (0 if not set.)

const char* DSIGKeyInfoX509::getX509IssuerSerialNumber void   
 

Get the IsserSerialNumber.

Get the serial number of the certificate of the issuer of the signing certificate.

Returns:
A pointer to the string containing the IssuerSerialNumber. (0 if not set.)

const char* DSIGKeyInfoX509::getX509SubjectName void   
 

Get the name of the certificate.

Get the name stored in the X509SubjectName element (if it exists).

Returns:
A pointer to a char buffer containing the name (0 if not set.)

virtual void DSIGKeyInfoX509::load   [virtual]
 

Function called to load an XML structure.

Function called by DSIGSignature to load an X509Data structure from DOMNodes.

Implements DSIGKeyInfo.

void DSIGKeyInfoX509::setX509IssuerSerial const char *    name,
const char *    serial
 

Set the IssuerSerial element.

If an X509IssuerSerial exists, replace the values with those provided, otherwise create a new element and set the values appropriately.

Parameters:
name  The name of the issuer.
serial  The serial number of the issuer's certificate

void DSIGKeyInfoX509::setX509SubjectName const char *    name
 

Set the X509SubjectName element in the KeyInfo element.

If a X509SubjectName element exists, replace the text with the provided text. Otherwise create the element and set the text.

Parameters:
name  The name to set.


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