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

DSIGKeyInfoX509 Class Reference
[Main Signature API]

#include <DSIGKeyInfoX509.hpp>

Inheritance diagram for DSIGKeyInfoX509:

Inheritance graph
[legend]
Collaboration diagram for DSIGKeyInfoX509:

Collaboration graph
[legend]
List of all members.

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.


Public Types

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

Public Member Functions

Constructors and Destructors
 DSIGKeyInfoX509 (const XSECEnv *env, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *X509Data)
 Constructor used when XML structures exist.
 DSIGKeyInfoX509 (const XSECEnv *env)
 Constructor called when building XML structures.
virtual ~DSIGKeyInfoX509 ()
 Destructor.
Load function and get methods
virtual void load ()
 Function called to load an XML structure.
const XMLCh * getX509SubjectName (void)
 Get the name of the certificate.
const XMLCh * getKeyName (void)
 Get the name of the certificate (interface function).
const XMLCh * getX509IssuerName (void)
 Get the IssuerSerialName.
const XMLCh * getX509IssuerSerialNumber (void)
 Get the IsserSerialNumber.
const XMLCh * getX509CRL (void)
 Get any associated CRL.
const XMLCh * getX509SKI (void)
 Get the SKI value (if set).
const XMLCh * getRawRetrievalURI (void)
 Return the raw Retrieval method to find this certificate.
int getCertificateListSize (void)
 Find the number of certificates held.
const XMLCh * getCertificateItem (int item)
 Get the DER encoded certificate pointed to in the list.
XSECCryptoX509getCertificateCryptoItem (int item)
 Get the Crypto Interface X509 structure version of the certificate.
virtual keyInfoType getKeyInfoType (void)
 Interface function to find the type of this KeyInfo.
Create and Set functions
XERCES_CPP_NAMESPACE_QUALIFIER
DOMElement * 
createBlankX509Data (void)
 Create a new X509 data element.
void setX509SubjectName (const XMLCh *name)
 Set the X509SubjectName element in the KeyInfo element.
void setX509IssuerSerial (const XMLCh *name, const XMLCh *serial)
 Set the IssuerSerial element.
void setX509CRL (const XMLCh *crl)
 Set the CRL element.
void setX509SKI (const XMLCh *ski)
 Set the SKI element.
void setRawRetrievalURI (const XMLCh *uri)
 set the retrieval URI
void appendX509Certificate (const XMLCh *base64Certificate)
 Add a certificate.

Classes

struct  X509Holder


Member Typedef Documentation

typedef size_t DSIGKeyInfoX509::size_type
 

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


Constructor & Destructor Documentation

DSIGKeyInfoX509::DSIGKeyInfoX509 const XSECEnv env,
XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *  X509Data
 

Constructor used when XML structures exist.

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

Parameters:
env Operating environment
X509Data DOMNode at start of data

DSIGKeyInfoX509::DSIGKeyInfoX509 const XSECEnv env  ) 
 

Constructor called when building XML structures.

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

Parameters:
env Operating environment

virtual DSIGKeyInfoX509::~DSIGKeyInfoX509  )  [virtual]
 

Destructor.


Member Function Documentation

void DSIGKeyInfoX509::appendX509Certificate const XMLCh *  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.

XERCES_CPP_NAMESPACE_QUALIFIER 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.

XSECCryptoX509* DSIGKeyInfoX509::getCertificateCryptoItem int  item  ) 
 

Get the Crypto Interface X509 structure version of the certificate.

Use the index to find the required certificate and return a pointer to the XSECCryptoX509 cert

Returns:
A pointer to the XSECCryptoX509 cert structure

const XMLCh* DSIGKeyInfoX509::getCertificateItem int  item  ) 
 

Get the DER 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.

const XMLCh* 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 pointer to the buffer containing the name (or NULL if not set). The decoded string is returned.
See also:
setX509SubjectName(void)

Implements DSIGKeyInfo.

const XMLCh* DSIGKeyInfoX509::getRawRetrievalURI void   ) 
 

Return the raw Retrieval method to find this certificate.

In some cases, the KeyInfo RetrievalMethod references a raw certificate In such cases, the library simply creates a KeyInfoX509 object and sets this string to allow others to find the certificate

const XMLCh* DSIGKeyInfoX509::getX509CRL void   ) 
 

Get any associated CRL.

Return the string containing the base64 encoded CRL that was held in the X509CRL node

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

const XMLCh* DSIGKeyInfoX509::getX509IssuerName void   ) 
 

Get the IssuerSerialName.

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

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

const XMLCh* 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.) This is the decoded string.
See also:
setX509IssuerSerial

const XMLCh* DSIGKeyInfoX509::getX509SKI void   ) 
 

Get the SKI value (if set).

The SKI (Subject Key Identifier) can be used to reference a required certificate. If this was set in the KeyInfo element, this function will return the value

Returns:
the base64 encoded (plan - not DER) encoded SKI value

const XMLCh* 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 buffer containing the name (NULL if not set.)

virtual void DSIGKeyInfoX509::load  )  [virtual]
 

Function called to load an XML structure.

Function called by intercace class to load an X509Data structure from DOMNodes.

Implements DSIGKeyInfo.

void DSIGKeyInfoX509::setRawRetrievalURI const XMLCh *  uri  ) 
 

set the retrieval URI

Generally to be used by internal library processes only. This sets the retrieval URI - but does _not_ manipulate the DOM in any way.

Parameters:
uri The URI string to use

void DSIGKeyInfoX509::setX509CRL const XMLCh *  crl  ) 
 

Set the CRL element.

If an X509CRL exists, replace the value with that provided, otherwise create a new element and set the value appropriately.

Parameters:
crl The base64 encoded string containing the CRL

void DSIGKeyInfoX509::setX509IssuerSerial const XMLCh *  name,
const XMLCh *  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.

Note:
XMLDSIG requires Distinguished Names be encoded in a defined manner (escaping '<' characters etc.). This method will perform this encoding prior to creating the DOM nodes.
Parameters:
name The name of the issuer.
serial The serial number of the issuer's certificate

void DSIGKeyInfoX509::setX509SKI const XMLCh *  ski  ) 
 

Set the SKI element.

The SKI node provides a reference to the Subject Key Identifier of a certificate.

This function takes a base64 encoded ski and sets it into the appropriate node

Parameters:
ski The base64 plain (non-DER) encoded SKI value

void DSIGKeyInfoX509::setX509SubjectName const XMLCh *  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.

Note:
XMLDSIG requires Distinguished Names be encoded in a defined manner (escaping '<' characters etc.). This method will perform this encoding prior to creating the DOM nodes.
Parameters:
name The name to set.


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