xmlsec_keyinfo.c File Reference

xmlSecKeyInfoNodeRead(xmlNodePtr, xmlSecKeyPtr, xmlSecKeyInfoCtxPtr)

EXPORT_C int xmlSecKeyInfoNodeRead ( xmlNodePtr keyInfoNode,
xmlSecKeyPtr key,
xmlSecKeyInfoCtxPtr keyInfoCtx
)

xmlSecKeyInfoNodeRead: : the pointer to <dsig:KeyInfo/> node. : the pointer to result key object. : the pointer to <dsig:KeyInfo/> element processing context.

Parses the <dsig:KeyInfo/> element , extracts the key data and stores into .

Returns 0 on success or -1 if an error occurs.

Parameters

xmlNodePtr keyInfoNode
xmlSecKeyPtr key
xmlSecKeyInfoCtxPtr keyInfoCtx

xmlSecKeyInfoNodeWrite(xmlNodePtr, xmlSecKeyPtr, xmlSecKeyInfoCtxPtr)

EXPORT_C int xmlSecKeyInfoNodeWrite ( xmlNodePtr keyInfoNode,
xmlSecKeyPtr key,
xmlSecKeyInfoCtxPtr keyInfoCtx
)

xmlSecKeyInfoNodeWrite: : the pointer to <dsig:KeyInfo/> node. : the pointer to key object. : the pointer to <dsig:KeyInfo/> element processing context.

Writes the into the <dsig:KeyInfo/> element template .

Returns 0 on success or -1 if an error occurs.

Parameters

xmlNodePtr keyInfoNode
xmlSecKeyPtr key
xmlSecKeyInfoCtxPtr keyInfoCtx

xmlSecKeyInfoCtxCreate(xmlSecKeysMngrPtr)

EXPORT_C xmlSecKeyInfoCtxPtr xmlSecKeyInfoCtxCreate ( xmlSecKeysMngrPtr keysMngr )

xmlSecKeyInfoCtxCreate: : the pointer to keys manager (may be NULL).

Allocates and initializes <dsig:KeyInfo/> element processing context. Caller is responsible for freeing it by calling xmlSecKeyInfoCtxDestroy function.

Returns pointer to newly allocated object or NULL if an error occurs.

Parameters

xmlSecKeysMngrPtr keysMngr

xmlSecKeyInfoCtxDestroy(xmlSecKeyInfoCtxPtr)

EXPORT_C void xmlSecKeyInfoCtxDestroy ( xmlSecKeyInfoCtxPtr keyInfoCtx )

xmlSecKeyInfoCtxDestroy: : the pointer to <dsig:KeyInfo/> element processing context.

Destroys object created with xmlSecKeyInfoCtxCreate function.

Parameters

xmlSecKeyInfoCtxPtr keyInfoCtx

xmlSecKeyInfoCtxInitialize(xmlSecKeyInfoCtxPtr, xmlSecKeysMngrPtr)

EXPORT_C int xmlSecKeyInfoCtxInitialize ( xmlSecKeyInfoCtxPtr keyInfoCtx,
xmlSecKeysMngrPtr keysMngr
)

xmlSecKeyInfoCtxInitialize: : the pointer to <dsig:KeyInfo/> element processing context. : the pointer to keys manager (may be NULL).

Initializes <dsig:KeyInfo/> element processing context. Caller is responsible for cleaning it up by xmlSecKeyInfoCtxFinalize function.

Returns 0 on success and a negative value if an error occurs.

Parameters

xmlSecKeyInfoCtxPtr keyInfoCtx
xmlSecKeysMngrPtr keysMngr

xmlSecKeyInfoCtxFinalize(xmlSecKeyInfoCtxPtr)

EXPORT_C void xmlSecKeyInfoCtxFinalize ( xmlSecKeyInfoCtxPtr keyInfoCtx )

xmlSecKeyInfoCtxFinalize: : the pointer to <dsig:KeyInfo/> element processing context.

Cleans up the initialized with xmlSecKeyInfoCtxInitialize function.

Parameters

xmlSecKeyInfoCtxPtr keyInfoCtx

xmlSecKeyInfoCtxReset(xmlSecKeyInfoCtxPtr)

EXPORT_C void xmlSecKeyInfoCtxReset ( xmlSecKeyInfoCtxPtr keyInfoCtx )

xmlSecKeyInfoCtxReset: : the pointer to <dsig:KeyInfo/> element processing context.

Resets the state. User settings are not changed.

Parameters

xmlSecKeyInfoCtxPtr keyInfoCtx

xmlSecKeyInfoCtxCreateEncCtx(xmlSecKeyInfoCtxPtr)

EXPORT_C int xmlSecKeyInfoCtxCreateEncCtx ( xmlSecKeyInfoCtxPtr keyInfoCtx )

xmlSecKeyInfoCtxCreateEncCtx: : the pointer to <dsig:KeyInfo/> element processing context.

Creates encryption context form processing <enc:EncryptedKey/> child of <dsig:KeyInfo/> element.

Returns 0 on success and a negative value if an error occurs.

Parameters

xmlSecKeyInfoCtxPtr keyInfoCtx

xmlSecKeyInfoCtxCopyUserPref(xmlSecKeyInfoCtxPtr, xmlSecKeyInfoCtxPtr)

EXPORT_C int xmlSecKeyInfoCtxCopyUserPref ( xmlSecKeyInfoCtxPtr dst,
xmlSecKeyInfoCtxPtr src
)

xmlSecKeyInfoCtxCopyUserPref: : the pointer to destination context object. : the pointer to source context object.

Copies user preferences from context to context.

Returns 0 on success and a negative value if an error occurs.

xmlSecKeyInfoCtxDebugDump(xmlSecKeyInfoCtxPtr, FILE *)

EXPORT_C void xmlSecKeyInfoCtxDebugDump ( xmlSecKeyInfoCtxPtr keyInfoCtx,
FILE * output
)

xmlSecKeyInfoCtxDebugDump: : the pointer to <dsig:KeyInfo/> element processing context. : the output file pointer.

Prints user settings and current context state to .

Parameters

xmlSecKeyInfoCtxPtr keyInfoCtx
FILE * output

xmlSecKeyInfoCtxDebugXmlDump(xmlSecKeyInfoCtxPtr, FILE *)

EXPORT_C void xmlSecKeyInfoCtxDebugXmlDump ( xmlSecKeyInfoCtxPtr keyInfoCtx,
FILE * output
)

xmlSecKeyInfoCtxDebugXmlDump: : the pointer to <dsig:KeyInfo/> element processing context. : the output file pointer.

Prints user settings and current context state in XML format to .

Parameters

xmlSecKeyInfoCtxPtr keyInfoCtx
FILE * output

xmlSecKeyDataNameXmlRead(xmlSecKeyDataId, xmlSecKeyPtr, xmlNodePtr, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataNameXmlRead ( xmlSecKeyDataId id,
xmlSecKeyPtr key,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

xmlSecKeyDataNameXmlWrite(xmlSecKeyDataId, xmlSecKeyPtr, xmlNodePtr, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataNameXmlWrite ( xmlSecKeyDataId id,
xmlSecKeyPtr key,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

xmlSecKeyDataKlass xmlSecKeyDataNameKlass

xmlSecKeyDataKlass xmlSecKeyDataNameKlass [static]

xmlSecKeyDataNameGetKlass(void)

EXPORT_C xmlSecKeyDataId xmlSecKeyDataNameGetKlass ( void )

xmlSecKeyDataNameGetKlass:

The <dsig:KeyName/> element key data klass ( http://www.w3.org/TR/xmldsig-core/#sec-KeyName ):

The KeyName element contains a string value (in which white space is significant) which may be used by the signer to communicate a key identifier to the recipient. Typically, KeyName contains an identifier related to the key pair used to sign the message, but it may contain other protocol-related information that indirectly identifies a key pair. (Common uses of KeyName include simple string names for keys, a key index, a distinguished name (DN), an email address, etc.)

Returns the <dsig:KeyName/> element processing key data klass.

Parameters

void

xmlSecKeyDataValueXmlRead(xmlSecKeyDataId, xmlSecKeyPtr, xmlNodePtr, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataValueXmlRead ( xmlSecKeyDataId id,
xmlSecKeyPtr key,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

xmlSecKeyDataValueXmlWrite(xmlSecKeyDataId, xmlSecKeyPtr, xmlNodePtr, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataValueXmlWrite ( xmlSecKeyDataId id,
xmlSecKeyPtr key,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

xmlSecKeyDataKlass xmlSecKeyDataValueKlass

xmlSecKeyDataKlass xmlSecKeyDataValueKlass [static]

xmlSecKeyDataValueGetKlass(void)

EXPORT_C xmlSecKeyDataId xmlSecKeyDataValueGetKlass ( void )

xmlSecKeyDataValueGetKlass:

The <dsig:KeyValue/> element key data klass ( http://www.w3.org/TR/xmldsig-core/#sec-KeyValue ):

The KeyValue element contains a single public key that may be useful in validating the signature.

Returns the <dsig:KeyValue/> element processing key data klass.

Parameters

void

xmlSecKeyDataRetrievalMethodXmlRead(xmlSecKeyDataId, xmlSecKeyPtr, xmlNodePtr, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataRetrievalMethodXmlRead ( xmlSecKeyDataId id,
xmlSecKeyPtr key,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

xmlSecKeyDataRetrievalMethodXmlWrite(xmlSecKeyDataId, xmlSecKeyPtr, xmlNodePtr, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataRetrievalMethodXmlWrite ( xmlSecKeyDataId id,
xmlSecKeyPtr key,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

xmlSecKeyDataKlass xmlSecKeyDataRetrievalMethodKlass

xmlSecKeyDataKlass xmlSecKeyDataRetrievalMethodKlass [static]

xmlSecKeyDataRetrievalMethodReadXmlResult(xmlSecKeyDataId, xmlSecKeyPtr, const xmlChar *, xmlSecSize, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataRetrievalMethodReadXmlResult ( xmlSecKeyDataId typeId,
xmlSecKeyPtr key,
const xmlChar * buffer,
xmlSecSize bufferSize,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

Parameters

xmlSecKeyDataId typeId
xmlSecKeyPtr key
const xmlChar * buffer
xmlSecSize bufferSize
xmlSecKeyInfoCtxPtr keyInfoCtx

xmlSecKeyDataRetrievalMethodGetKlass(void)

EXPORT_C xmlSecKeyDataId xmlSecKeyDataRetrievalMethodGetKlass ( void )

xmlSecKeyDataRetrievalMethodGetKlass:

The <dsig:RetrievalMethod/> element key data klass ( http://www.w3.org/TR/xmldsig-core/#sec-RetrievalMethod ): A RetrievalMethod element within KeyInfo is used to convey a reference to KeyInfo information that is stored at another location. For example, several signatures in a document might use a key verified by an X.509v3 certificate chain appearing once in the document or remotely outside the document; each signature's KeyInfo can reference this chain using a single RetrievalMethod element instead of including the entire chain with a sequence of X509Certificate elements.

RetrievalMethod uses the same syntax and dereferencing behavior as Reference's URI and The Reference Processing Model.

Returns the <dsig:RetrievalMethod/> element processing key data klass.

Parameters

void

xmlSecKeyDataEncryptedKeyXmlRead(xmlSecKeyDataId, xmlSecKeyPtr, xmlNodePtr, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataEncryptedKeyXmlRead ( xmlSecKeyDataId id,
xmlSecKeyPtr key,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

xmlSecKeyDataEncryptedKeyXmlWrite(xmlSecKeyDataId, xmlSecKeyPtr, xmlNodePtr, xmlSecKeyInfoCtxPtr)

int xmlSecKeyDataEncryptedKeyXmlWrite ( xmlSecKeyDataId id,
xmlSecKeyPtr key,
xmlNodePtr node,
xmlSecKeyInfoCtxPtr keyInfoCtx
) [static]

xmlSecKeyDataKlass xmlSecKeyDataEncryptedKeyKlass

xmlSecKeyDataKlass xmlSecKeyDataEncryptedKeyKlass [static]

xmlSecKeyDataEncryptedKeyGetKlass(void)

EXPORT_C xmlSecKeyDataId xmlSecKeyDataEncryptedKeyGetKlass ( void )

xmlSecKeyDataEncryptedKeyGetKlass:

The <enc:EncryptedKey/> element key data klass ( http://www.w3.org/TR/xmlenc-core/#sec-EncryptedKey ):

The EncryptedKey element is used to transport encryption keys from the originator to a known recipient(s). It may be used as a stand-alone XML document, be placed within an application document, or appear inside an EncryptedData element as a child of a ds:KeyInfo element. The key value is always encrypted to the recipient(s). When EncryptedKey is decrypted the resulting octets are made available to the EncryptionMethod algorithm without any additional processing.

Returns the <enc:EncryptedKey/> element processing key data klass.

Parameters

void