XML Security Library

LibXML2
LibXSLT
OpenSSL

keysdata

Name

keysdata -- 

Synopsis


typedef     xmlSecKeyDataUsage;
#define     xmlSecKeyDataUsageUnknown
#define     xmlSecKeyDataUsageKeyInfoNodeRead
#define     xmlSecKeyDataUsageKeyInfoNodeWrite
#define     xmlSecKeyDataUsageKeyValueNodeRead
#define     xmlSecKeyDataUsageKeyValueNodeWrite
#define     xmlSecKeyDataUsageRetrievalMethodNodeXml
#define     xmlSecKeyDataUsageRetrievalMethodNodeBin
#define     xmlSecKeyDataUsageAny
#define     xmlSecKeyDataUsageKeyInfoNode
#define     xmlSecKeyDataUsageKeyValueNode
#define     xmlSecKeyDataUsageRetrievalMethodNode
typedef     xmlSecKeyDataType;
#define     xmlSecKeyDataTypeUnknown
#define     xmlSecKeyDataTypeNone
#define     xmlSecKeyDataTypePublic
#define     xmlSecKeyDataTypePrivate
#define     xmlSecKeyDataTypeSymmetric
#define     xmlSecKeyDataTypeSession
#define     xmlSecKeyDataTypePermanent
#define     xmlSecKeyDataTypeAny
xmlSecPtrListPtr xmlSecKeyDataIdsGet        (void);
int         xmlSecKeyDataIdsInit            (void);
void        xmlSecKeyDataIdsShutdown        (void);
int         xmlSecKeyDataIdsRegisterDefault (void);
int         xmlSecKeyDataIdsRegister        (xmlSecKeyDataId id);
struct      xmlSecKeyData;
xmlSecKeyDataPtr xmlSecKeyDataCreate        (xmlSecKeyDataId id);
xmlSecKeyDataPtr xmlSecKeyDataDuplicate     (xmlSecKeyDataPtr data);
void        xmlSecKeyDataDestroy            (xmlSecKeyDataPtr data);
int         xmlSecKeyDataGenerate           (xmlSecKeyDataPtr data,
                                             size_t sizeBits,
                                             xmlSecKeyDataType type);
xmlSecKeyDataType xmlSecKeyDataGetType      (xmlSecKeyDataPtr data);
size_t      xmlSecKeyDataGetSize            (xmlSecKeyDataPtr data);
const xmlChar* xmlSecKeyDataGetIdentifier   (xmlSecKeyDataPtr data);
void        xmlSecKeyDataDebugDump          (xmlSecKeyDataPtr data,
                                             FILE *output);
void        xmlSecKeyDataDebugXmlDump       (xmlSecKeyDataPtr data,
                                             FILE *output);
int         xmlSecKeyDataXmlRead            (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr dataNode,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         xmlSecKeyDataXmlWrite           (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr dataNode,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         xmlSecKeyDataBinRead            (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char *buf,
                                             size_t bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         xmlSecKeyDataBinWrite           (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char **buf,
                                             size_t *bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
#define     xmlSecKeyDataGetName            (data)
#define     xmlSecKeyDataIsValid            (data)
#define     xmlSecKeyDataCheckId            (data, dataId)
#define     xmlSecKeyDataCheckUsage         (data, usg)
#define     xmlSecKeyDataCheckSize          (data, size)
#define     xmlSecKeyDataIdUnknown
int         (*xmlSecKeyDataInitMethod)      (xmlSecKeyDataPtr data);
int         (*xmlSecKeyDataDuplicateMethod) (xmlSecKeyDataPtr dst,
                                             xmlSecKeyDataPtr src);
void        (*xmlSecKeyDataFinalizeMethod)  (xmlSecKeyDataPtr data);
int         (*xmlSecKeyDataXmlReadMethod)   (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr node,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         (*xmlSecKeyDataXmlWriteMethod)  (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr node,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         (*xmlSecKeyDataBinReadMethod)   (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char *buf,
                                             size_t bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         (*xmlSecKeyDataBinWriteMethod)  (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char **buf,
                                             size_t *bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         (*xmlSecKeyDataGenerateMethod)  (xmlSecKeyDataPtr data,
                                             size_t sizeBits,
                                             xmlSecKeyDataType type);
xmlSecKeyDataType (*xmlSecKeyDataGetTypeMethod)
                                            (xmlSecKeyDataPtr data);
size_t      (*xmlSecKeyDataGetSizeMethod)   (xmlSecKeyDataPtr data);
const xmlChar* (*xmlSecKeyDataGetIdentifierMethod)
                                            (xmlSecKeyDataPtr data);
void        (*xmlSecKeyDataDebugDumpMethod) (xmlSecKeyDataPtr data,
                                             FILE *output);
struct      xmlSecKeyDataKlass;
#define     xmlSecKeyDataKlassGetName       (klass)
#define     xmlSecKeyDataListId
xmlSecPtrListId xmlSecKeyDataListGetKlass   (void);
#define     xmlSecKeyDataIdListId
xmlSecPtrListId xmlSecKeyDataIdListGetKlass (void);
int         xmlSecKeyDataIdListFind         (xmlSecPtrListPtr list,
                                             xmlSecKeyDataId dataId);
xmlSecKeyDataId xmlSecKeyDataIdListFindByNode
                                            (xmlSecPtrListPtr list,
                                             const xmlChar *nodeName,
                                             const xmlChar *nodeNs,
                                             xmlSecKeyDataUsage usage);
xmlSecKeyDataId xmlSecKeyDataIdListFindByHref
                                            (xmlSecPtrListPtr list,
                                             const xmlChar *href,
                                             xmlSecKeyDataUsage usage);
xmlSecKeyDataId xmlSecKeyDataIdListFindByName
                                            (xmlSecPtrListPtr list,
                                             const xmlChar *name,
                                             xmlSecKeyDataUsage usage);
void        xmlSecKeyDataIdListDebugDump    (xmlSecPtrListPtr list,
                                             FILE *output);
void        xmlSecKeyDataIdListDebugXmlDump (xmlSecPtrListPtr list,
                                             FILE *output);
#define     xmlSecKeyDataBinarySize
int         xmlSecKeyDataBinaryValueInitialize
                                            (xmlSecKeyDataPtr data);
int         xmlSecKeyDataBinaryValueDuplicate
                                            (xmlSecKeyDataPtr dst,
                                             xmlSecKeyDataPtr src);
void        xmlSecKeyDataBinaryValueFinalize
                                            (xmlSecKeyDataPtr data);
int         xmlSecKeyDataBinaryValueXmlRead (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr node,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         xmlSecKeyDataBinaryValueXmlWrite
                                            (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr node,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         xmlSecKeyDataBinaryValueBinRead (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char *buf,
                                             size_t bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
int         xmlSecKeyDataBinaryValueBinWrite
                                            (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char **buf,
                                             size_t *bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);
void        xmlSecKeyDataBinaryValueDebugDump
                                            (xmlSecKeyDataPtr data,
                                             FILE *output);
void        xmlSecKeyDataBinaryValueDebugXmlDump
                                            (xmlSecKeyDataPtr data,
                                             FILE *output);
size_t      xmlSecKeyDataBinaryValueGetSize (xmlSecKeyDataPtr data);
xmlSecBufferPtr xmlSecKeyDataBinaryValueGetBuffer
                                            (xmlSecKeyDataPtr data);
int         xmlSecKeyDataBinaryValueSetBuffer
                                            (xmlSecKeyDataPtr data,
                                             unsigned char *buf,
                                             size_t bufSize);
struct      xmlSecKeyDataStore;
xmlSecKeyDataStorePtr xmlSecKeyDataStoreCreate
                                            (xmlSecKeyDataStoreId id);
void        xmlSecKeyDataStoreDestroy       (xmlSecKeyDataStorePtr store);
#define     xmlSecKeyDataStoreGetName       (store)
#define     xmlSecKeyDataStoreIsValid       (store)
#define     xmlSecKeyDataStoreCheckId       (store, storeId)
#define     xmlSecKeyDataStoreCheckSize     (store, size)
#define     xmlSecKeyDataStoreIdUnknown
int         (*xmlSecKeyDataStoreInitializeMethod)
                                            (xmlSecKeyDataStorePtr store);
void        (*xmlSecKeyDataStoreFinalizeMethod)
                                            (xmlSecKeyDataStorePtr store);
struct      xmlSecKeyDataStoreKlass;
#define     xmlSecKeyDataStoreKlassGetName  (klass)
#define     xmlSecKeyDataStorePtrListId
xmlSecPtrListId xmlSecKeyDataStorePtrListGetKlass
                                            (void);

Description

Details

xmlSecKeyDataUsage

typedef unsigned int					xmlSecKeyDataUsage;

The bits mask that determines possible keys data usage.


xmlSecKeyDataUsageUnknown

#define xmlSecKeyDataUsageUnknown			0x00000

The key data usage is unknown.


xmlSecKeyDataUsageKeyInfoNodeRead

#define xmlSecKeyDataUsageKeyInfoNodeRead		0x00001

The key data could be read from a <dsig:KeyInfo/> child.


xmlSecKeyDataUsageKeyInfoNodeWrite

#define xmlSecKeyDataUsageKeyInfoNodeWrite		0x00002

The key data could be written to a <dsig:KeyInfo /> child.


xmlSecKeyDataUsageKeyValueNodeRead

#define xmlSecKeyDataUsageKeyValueNodeRead		0x00004

The key data could be read from a <dsig:KeyValue /> child.


xmlSecKeyDataUsageKeyValueNodeWrite

#define xmlSecKeyDataUsageKeyValueNodeWrite		0x00008

The key data could be written to a <dsig:KeyValue /> child.


xmlSecKeyDataUsageRetrievalMethodNodeXml

#define xmlSecKeyDataUsageRetrievalMethodNodeXml	0x00010

The key data could be retrieved using <dsig:RetrievalMethod /> node in XML format.


xmlSecKeyDataUsageRetrievalMethodNodeBin

#define xmlSecKeyDataUsageRetrievalMethodNodeBin	0x00020

The key data could be retrieved using <dsig:RetrievalMethod /> node in binary format.


xmlSecKeyDataUsageAny

#define xmlSecKeyDataUsageAny				0xFFFFF

Any key data usage.


xmlSecKeyDataUsageKeyInfoNode

#define     xmlSecKeyDataUsageKeyInfoNode

The key data could be read and written from/to a <dsig:KeyInfo /> child.


xmlSecKeyDataUsageKeyValueNode

#define     xmlSecKeyDataUsageKeyValueNode

The key data could be read and written from/to a <dsig:KeyValue /> child.


xmlSecKeyDataUsageRetrievalMethodNode

#define     xmlSecKeyDataUsageRetrievalMethodNode

The key data could be retrieved using <dsig:RetrievalMethod /> node in any format.


xmlSecKeyDataType

typedef unsigned int				xmlSecKeyDataType;

The key data type (public/private, session/permanet, etc.).


xmlSecKeyDataTypeUnknown

#define xmlSecKeyDataTypeUnknown			0x0000

The key data type is unknown (same as xmlSecKeyDataTypeNone).


xmlSecKeyDataTypeNone

#define xmlSecKeyDataTypeNone				xmlSecKeyDataTypeUnknown

The key data type is unknown (same as xmlSecKeyDataTypeUnknown).


xmlSecKeyDataTypePublic

#define xmlSecKeyDataTypePublic				0x0001

The key data contain a public key.


xmlSecKeyDataTypePrivate

#define xmlSecKeyDataTypePrivate			0x0002

The key data contain a private key.


xmlSecKeyDataTypeSymmetric

#define xmlSecKeyDataTypeSymmetric			0x0004

The key data contain a symmetric key.


xmlSecKeyDataTypeSession

#define xmlSecKeyDataTypeSession			0x0008

The key data contain session key (one time key, not stored in keys manager).


xmlSecKeyDataTypePermanent

#define xmlSecKeyDataTypePermanent			0x0010

The key data contain permanent key (stored in keys manager).


xmlSecKeyDataTypeAny

#define xmlSecKeyDataTypeAny				0xFFFF

Any key data.


xmlSecKeyDataIdsGet ()

xmlSecPtrListPtr xmlSecKeyDataIdsGet        (void);

Returns :  


xmlSecKeyDataIdsInit ()

int         xmlSecKeyDataIdsInit            (void);

Returns :  


xmlSecKeyDataIdsShutdown ()

void        xmlSecKeyDataIdsShutdown        (void);


xmlSecKeyDataIdsRegisterDefault ()

int         xmlSecKeyDataIdsRegisterDefault (void);

Returns :  


xmlSecKeyDataIdsRegister ()

int         xmlSecKeyDataIdsRegister        (xmlSecKeyDataId id);

id :  
Returns :  


struct xmlSecKeyData

struct xmlSecKeyData {
    xmlSecKeyDataId			id;
    void*				reserved0;
    void*				reserved1;
};

The key data: key value (crypto material), x509 data, pgp data, etc.

xmlSecKeyDataId id the data id (xmlSecKeyDataId).
void *reserved0 reserved for the future.
void *reserved1 reserved for the future.


xmlSecKeyDataCreate ()

xmlSecKeyDataPtr xmlSecKeyDataCreate        (xmlSecKeyDataId id);

Creates new data of the specified type id.

id : the data id.
Returns : the pointer to newly allocated xmlSecKeyData structure or NULL if an error occurs.


xmlSecKeyDataDuplicate ()

xmlSecKeyDataPtr xmlSecKeyDataDuplicate     (xmlSecKeyDataPtr data);

Creates a duplicate of the given data.

data : the pointer to the xmlSecKeyData structure.
Returns : the pointer to newly allocated xmlSecKeyData structure or NULL if an error occurs.


xmlSecKeyDataDestroy ()

void        xmlSecKeyDataDestroy            (xmlSecKeyDataPtr data);

Destroys the data and frees all allocated memory.

data : the pointer to the xmlSecKeyData structure.


xmlSecKeyDataGenerate ()

int         xmlSecKeyDataGenerate           (xmlSecKeyDataPtr data,
                                             size_t sizeBits,
                                             xmlSecKeyDataType type);

KeyData specific destroy method.

data : the data.
sizeBits : the key data specific size.
type :  
Returns : 0 on success or a negative value otherwise.


xmlSecKeyDataGetType ()

xmlSecKeyDataType xmlSecKeyDataGetType      (xmlSecKeyDataPtr data);

data :  
Returns :  


xmlSecKeyDataGetSize ()

size_t      xmlSecKeyDataGetSize            (xmlSecKeyDataPtr data);

data :  
Returns :  


xmlSecKeyDataGetIdentifier ()

const xmlChar* xmlSecKeyDataGetIdentifier   (xmlSecKeyDataPtr data);

data :  
Returns :  


xmlSecKeyDataDebugDump ()

void        xmlSecKeyDataDebugDump          (xmlSecKeyDataPtr data,
                                             FILE *output);

Prints key data debug info.

data : the data.
output : the FILE to print debug info (should be open for writing).


xmlSecKeyDataDebugXmlDump ()

void        xmlSecKeyDataDebugXmlDump       (xmlSecKeyDataPtr data,
                                             FILE *output);

Prints key data debug info in XML format.

data : the data.
output : the FILE to print debug info (should be open for writing).


xmlSecKeyDataXmlRead ()

int         xmlSecKeyDataXmlRead            (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr dataNode,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

Reads the data from XML node.

id : the data id.
key : the key.
dataNode :  
keyInfoCtx : the keys mngr.
Returns : 0 on success or a negative value otherwise.


xmlSecKeyDataXmlWrite ()

int         xmlSecKeyDataXmlWrite           (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr dataNode,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

Reads the data from XML node.

id : the data id.
key : the key.
dataNode :  
keyInfoCtx : the keys mngr.
Returns : 0 on success or a negative value otherwise.


xmlSecKeyDataBinRead ()

int         xmlSecKeyDataBinRead            (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char *buf,
                                             size_t bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

Reads the data from binary buffer buf.

id : the data id.
key : the key.
buf : the input buffer.
bufSize : the buffer size.
keyInfoCtx : the <dsig:KeyInfo> node processing context
Returns : 0 on success or a negative value if an error occurs.


xmlSecKeyDataBinWrite ()

int         xmlSecKeyDataBinWrite           (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char **buf,
                                             size_t *bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

id :  
key :  
buf :  
bufSize :  
keyInfoCtx :  
Returns :  


xmlSecKeyDataGetName()

#define     xmlSecKeyDataGetName(data)

Macro. Returns the key data name.

data : the pointer to key data.


xmlSecKeyDataIsValid()

#define     xmlSecKeyDataIsValid(data)

Macro. Returns 1 if data is not NULL and data->id is not NULL or 0 otherwise.

data : the pointer to data.


xmlSecKeyDataCheckId()

#define     xmlSecKeyDataCheckId(data, dataId)

Macro. Returns 1 if data is valid and data's id is equal to dataId.

data : the pointer to data.
dataId : the data Id.


xmlSecKeyDataCheckUsage()

#define     xmlSecKeyDataCheckUsage(data, usg)

Macro. Returns 1 if data is valid and could be used for usg.

data : the pointer to data.
usg : the data usage.


xmlSecKeyDataCheckSize()

#define     xmlSecKeyDataCheckSize(data, size)

Macro. Returns 1 if data is valid and data's object has at least size bytes.

data : the pointer to data.
size : the expected size.


xmlSecKeyDataIdUnknown

#define xmlSecKeyDataIdUnknown 			NULL

The "unknown" id.


xmlSecKeyDataInitMethod ()

int         (*xmlSecKeyDataInitMethod)      (xmlSecKeyDataPtr data);

Key data specific initialization method.

data : the data.
Returns : 0 on success or a negative value if an error occurs.


xmlSecKeyDataDuplicateMethod ()

int         (*xmlSecKeyDataDuplicateMethod) (xmlSecKeyDataPtr dst,
                                             xmlSecKeyDataPtr src);

Key data specific duplication (copy) method.

dst :  
src :  
Returns : 0 on success or a negative value if an error occurs.


xmlSecKeyDataFinalizeMethod ()

void        (*xmlSecKeyDataFinalizeMethod)  (xmlSecKeyDataPtr data);

Key data specific finalization method. All the objects and resources allocated by the key data object must be freed inside this method.

data : the data.


xmlSecKeyDataXmlReadMethod ()

int         (*xmlSecKeyDataXmlReadMethod)   (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr node,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

Key data specific method for reading XML node.

id : the data id.
key : the key.
node : the pointer to data's value XML node.
keyInfoCtx : the <dsig:KeyInfo/> node processing context.
Returns : 0 on success or a negative value if an error occurs.


xmlSecKeyDataXmlWriteMethod ()

int         (*xmlSecKeyDataXmlWriteMethod)  (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr node,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

id :  
key :  
node :  
keyInfoCtx :  
Returns :  


xmlSecKeyDataBinReadMethod ()

int         (*xmlSecKeyDataBinReadMethod)   (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char *buf,
                                             size_t bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

Key data specific method for reading binary buffer.

id : the data id.
key : the key.
buf : the input buffer.
bufSize : the buffer size.
keyInfoCtx : the <dsig:KeyInfo/> node processing context.
Returns : 0 on success or a negative value if an error occurs.


xmlSecKeyDataBinWriteMethod ()

int         (*xmlSecKeyDataBinWriteMethod)  (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char **buf,
                                             size_t *bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

id :  
key :  
buf :  
bufSize :  
keyInfoCtx :  
Returns :  


xmlSecKeyDataGenerateMethod ()

int         (*xmlSecKeyDataGenerateMethod)  (xmlSecKeyDataPtr data,
                                             size_t sizeBits,
                                             xmlSecKeyDataType type);

Key data specific method for generating new key data.

data : the data.
sizeBits : the key data specific size. & type: the required key type (session/permanent, etc.)
type :  
Returns : 0 on success or a negative value if an error occurs.


xmlSecKeyDataGetTypeMethod ()

xmlSecKeyDataType (*xmlSecKeyDataGetTypeMethod)
                                            (xmlSecKeyDataPtr data);

Key data specific method to get the key type.

data : the data.
Returns : the key type.


xmlSecKeyDataGetSizeMethod ()

size_t      (*xmlSecKeyDataGetSizeMethod)   (xmlSecKeyDataPtr data);

Key data specific method to get the key size.

data : the data.
Returns : the key size in bits.


xmlSecKeyDataGetIdentifierMethod ()

const xmlChar* (*xmlSecKeyDataGetIdentifierMethod)
                                            (xmlSecKeyDataPtr data);

Key data specific method to get the key data identifier string (for example, X509 data identifier is the subject of the verified cert).

data : the data.
Returns : the identifier string or NULL if an error occurs.


xmlSecKeyDataDebugDumpMethod ()

void        (*xmlSecKeyDataDebugDumpMethod) (xmlSecKeyDataPtr data,
                                             FILE *output);

Key data specific method for printing debug info.

data : the data.
output : the FILE to print debug info (should be open for writing).


struct xmlSecKeyDataKlass

struct xmlSecKeyDataKlass {
    size_t				klassSize;
    size_t				objSize;

    /* data */
    const xmlChar*			name;    
    xmlSecKeyDataUsage			usage;
    const xmlChar*			href;
    const xmlChar*			dataNodeName;
    const xmlChar*			dataNodeNs;
    
    /* constructors/destructor */
    xmlSecKeyDataInitMethod		initialize;
    xmlSecKeyDataDuplicateMethod	duplicate;
    xmlSecKeyDataFinalizeMethod		finalize;
    xmlSecKeyDataGenerateMethod		generate;
    
    /* get info */
    xmlSecKeyDataGetTypeMethod		getType;
    xmlSecKeyDataGetSizeMethod		getSize;
    xmlSecKeyDataGetIdentifierMethod	getIdentifier;

    /* read/write */
    xmlSecKeyDataXmlReadMethod		xmlRead;
    xmlSecKeyDataXmlWriteMethod		xmlWrite;
    xmlSecKeyDataBinReadMethod		binRead;
    xmlSecKeyDataBinWriteMethod		binWrite;

    /* debug */
    xmlSecKeyDataDebugDumpMethod	debugDump;
    xmlSecKeyDataDebugDumpMethod	debugXmlDump;

    /* for the future */
    void*				reserved0;
    void*				reserved1;
};

The data id (klass).

size_t klassSize the klass size.
size_t objSize the object size.
const xmlChar *name the object name.
xmlSecKeyDataUsage usage the allowed data usage.
const xmlChar *href the identification string (href).
const xmlChar *dataNodeName the data's XML node name.
const xmlChar *dataNodeNs the data's XML node namespace.
xmlSecKeyDataInitMethod initialize the initialization method.
xmlSecKeyDataDuplicateMethod duplicate the duplicate (copy) method.
xmlSecKeyDataFinalizeMethod finalize the finalization (destroy) method.
xmlSecKeyDataGenerateMethod generate the new data generation method.
xmlSecKeyDataGetTypeMethod getType the method to access data's type information.
xmlSecKeyDataGetSizeMethod getSize the method to access data's size.
xmlSecKeyDataGetIdentifierMethod getIdentifier the method to access data's string identifier.
xmlSecKeyDataXmlReadMethod xmlRead the method for reading data from XML node.
xmlSecKeyDataXmlWriteMethod xmlWrite the method for writing data to XML node.
xmlSecKeyDataBinReadMethod binRead the method for reading data from a binary buffer.
xmlSecKeyDataBinWriteMethod binWrite the method for writing data to binary buffer.
xmlSecKeyDataDebugDumpMethod debugDump the method for printing debug data information.
xmlSecKeyDataDebugDumpMethod debugXmlDump the method for printing debug data information in XML format.
void *reserved0 reserved for the future.
void *reserved1 reserved for the future.


xmlSecKeyDataKlassGetName()

#define     xmlSecKeyDataKlassGetName(klass)

Macro. Returns data klass name.

klass : the data klass.


xmlSecKeyDataListId

#define xmlSecKeyDataListId	xmlSecKeyDataListGetKlass()

The key data klasses list klass id.


xmlSecKeyDataListGetKlass ()

xmlSecPtrListId xmlSecKeyDataListGetKlass   (void);

Returns :  


xmlSecKeyDataIdListId

#define xmlSecKeyDataIdListId	xmlSecKeyDataIdListGetKlass()

The key data list klass id.


xmlSecKeyDataIdListGetKlass ()

xmlSecPtrListId xmlSecKeyDataIdListGetKlass (void);

Returns :  


xmlSecKeyDataIdListFind ()

int         xmlSecKeyDataIdListFind         (xmlSecPtrListPtr list,
                                             xmlSecKeyDataId dataId);

list :  
dataId :  
Returns :  


xmlSecKeyDataIdListFindByNode ()

xmlSecKeyDataId xmlSecKeyDataIdListFindByNode
                                            (xmlSecPtrListPtr list,
                                             const xmlChar *nodeName,
                                             const xmlChar *nodeNs,
                                             xmlSecKeyDataUsage usage);

list :  
nodeName :  
nodeNs :  
usage :  
Returns :  


xmlSecKeyDataIdListFindByHref ()

xmlSecKeyDataId xmlSecKeyDataIdListFindByHref
                                            (xmlSecPtrListPtr list,
                                             const xmlChar *href,
                                             xmlSecKeyDataUsage usage);

list :  
href :  
usage :  
Returns :  


xmlSecKeyDataIdListFindByName ()

xmlSecKeyDataId xmlSecKeyDataIdListFindByName
                                            (xmlSecPtrListPtr list,
                                             const xmlChar *name,
                                             xmlSecKeyDataUsage usage);

list :  
name :  
usage :  
Returns :  


xmlSecKeyDataIdListDebugDump ()

void        xmlSecKeyDataIdListDebugDump    (xmlSecPtrListPtr list,
                                             FILE *output);

list :  
output :  


xmlSecKeyDataIdListDebugXmlDump ()

void        xmlSecKeyDataIdListDebugXmlDump (xmlSecPtrListPtr list,
                                             FILE *output);

list :  
output :  


xmlSecKeyDataBinarySize

#define     xmlSecKeyDataBinarySize

The binary key data object size.


xmlSecKeyDataBinaryValueInitialize ()

int         xmlSecKeyDataBinaryValueInitialize
                                            (xmlSecKeyDataPtr data);

data :  
Returns :  


xmlSecKeyDataBinaryValueDuplicate ()

int         xmlSecKeyDataBinaryValueDuplicate
                                            (xmlSecKeyDataPtr dst,
                                             xmlSecKeyDataPtr src);

dst :  
src :  
Returns :  


xmlSecKeyDataBinaryValueFinalize ()

void        xmlSecKeyDataBinaryValueFinalize
                                            (xmlSecKeyDataPtr data);

data :  


xmlSecKeyDataBinaryValueXmlRead ()

int         xmlSecKeyDataBinaryValueXmlRead (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr node,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

id :  
key :  
node :  
keyInfoCtx :  
Returns :  


xmlSecKeyDataBinaryValueXmlWrite ()

int         xmlSecKeyDataBinaryValueXmlWrite
                                            (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             xmlNodePtr node,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

id :  
key :  
node :  
keyInfoCtx :  
Returns :  


xmlSecKeyDataBinaryValueBinRead ()

int         xmlSecKeyDataBinaryValueBinRead (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char *buf,
                                             size_t bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

id :  
key :  
buf :  
bufSize :  
keyInfoCtx :  
Returns :  


xmlSecKeyDataBinaryValueBinWrite ()

int         xmlSecKeyDataBinaryValueBinWrite
                                            (xmlSecKeyDataId id,
                                             xmlSecKeyPtr key,
                                             unsigned char **buf,
                                             size_t *bufSize,
                                             xmlSecKeyInfoCtxPtr keyInfoCtx);

id :  
key :  
buf :  
bufSize :  
keyInfoCtx :  
Returns :  


xmlSecKeyDataBinaryValueDebugDump ()

void        xmlSecKeyDataBinaryValueDebugDump
                                            (xmlSecKeyDataPtr data,
                                             FILE *output);

data :  
output :  


xmlSecKeyDataBinaryValueDebugXmlDump ()

void        xmlSecKeyDataBinaryValueDebugXmlDump
                                            (xmlSecKeyDataPtr data,
                                             FILE *output);

data :  
output :  


xmlSecKeyDataBinaryValueGetSize ()

size_t      xmlSecKeyDataBinaryValueGetSize (xmlSecKeyDataPtr data);

data :  
Returns :  


xmlSecKeyDataBinaryValueGetBuffer ()

xmlSecBufferPtr xmlSecKeyDataBinaryValueGetBuffer
                                            (xmlSecKeyDataPtr data);

data :  
Returns :  


xmlSecKeyDataBinaryValueSetBuffer ()

int         xmlSecKeyDataBinaryValueSetBuffer
                                            (xmlSecKeyDataPtr data,
                                             unsigned char *buf,
                                             size_t bufSize);

data :  
buf :  
bufSize :  
Returns :  


struct xmlSecKeyDataStore

struct xmlSecKeyDataStore {
    xmlSecKeyDataStoreId		id;

    /* for the future */
    void*				reserved0;
    void*				reserved1;
};

The key data store. Key data store holds common key data specific information required for key data processing. For example, X509 data store may hold information about trusted (root) certificates.

xmlSecKeyDataStoreId id the store id (xmlSecKeyDataStoreId).
void *reserved0 reserved for the future.
void *reserved1 reserved for the future.


xmlSecKeyDataStoreCreate ()

xmlSecKeyDataStorePtr xmlSecKeyDataStoreCreate
                                            (xmlSecKeyDataStoreId id);

Creates new store of the specified type id.

id : the store id.
Returns : the pointer to newly allocated xmlSecKeyDataStore structure or NULL if an error occurs.


xmlSecKeyDataStoreDestroy ()

void        xmlSecKeyDataStoreDestroy       (xmlSecKeyDataStorePtr store);

Destroys the store and frees all allocated memory.

store : the pointer to the xmlSecKeyDataStore structure.


xmlSecKeyDataStoreGetName()

#define     xmlSecKeyDataStoreGetName(store)

Macro. Returns key data store name.

store : the pointer to store.


xmlSecKeyDataStoreIsValid()

#define     xmlSecKeyDataStoreIsValid(store)

Macro. Returns 1 if store is not NULL and store->id is not NULL or 0 otherwise.

store : the pointer to store.


xmlSecKeyDataStoreCheckId()

#define     xmlSecKeyDataStoreCheckId(store, storeId)

Macro. Returns 1 if store is valid and store's id is equal to storeId.

store : the pointer to store.
storeId : the store Id.


xmlSecKeyDataStoreCheckSize()

#define     xmlSecKeyDataStoreCheckSize(store, size)

Macro. Returns 1 if data is valid and stores's object has at least size bytes.

store : the pointer to store.
size : the expected size.


xmlSecKeyDataStoreIdUnknown

#define xmlSecKeyDataStoreIdUnknown 			NULL

The "unknown" id.


xmlSecKeyDataStoreInitializeMethod ()

int         (*xmlSecKeyDataStoreInitializeMethod)
                                            (xmlSecKeyDataStorePtr store);

Key data store specific initialization method.

store : the data store.
Returns : 0 on success or a negative value if an error occurs.


xmlSecKeyDataStoreFinalizeMethod ()

void        (*xmlSecKeyDataStoreFinalizeMethod)
                                            (xmlSecKeyDataStorePtr store);

Key data store specific finalization (destroy) method.

store : the data store.


struct xmlSecKeyDataStoreKlass

struct xmlSecKeyDataStoreKlass {
    size_t				klassSize;
    size_t				objSize;

    /* data */
    const xmlChar*			name;    
        
    /* constructors/destructor */
    xmlSecKeyDataStoreInitializeMethod	initialize;
    xmlSecKeyDataStoreFinalizeMethod	finalize;

    /* for the future */
    void*				reserved0;
    void*				reserved1;
};


xmlSecKeyDataStoreKlassGetName()

#define     xmlSecKeyDataStoreKlassGetName(klass)

Macro. Returns store klass name.

klass : the pointer to store klass.


xmlSecKeyDataStorePtrListId

#define xmlSecKeyDataStorePtrListId	xmlSecKeyDataStorePtrListGetKlass()

The data store list id (klass).


xmlSecKeyDataStorePtrListGetKlass ()

xmlSecPtrListId xmlSecKeyDataStorePtrListGetKlass
                                            (void);

Returns :  



Aleksey Sanin