[xmlsec] Load hmac key for signature

Monica Lau mllau2004 at yahoo.com
Fri Oct 8 15:47:35 PDT 2004


Hi,
 
I need to load the hmac key to sign the XML document.  I searched the mailing list, and I found the following question/response below.  However, I still have some questions that I'm unclear about:
 
(a)  I looked at this function: 
 
int xmlSecOpenSSLKeyDataHmacSet(xmlSecKeyDataPtr data, const xmlSecByte *buf, xmlSecSize bufSize);
 
The API documentation mentioned that data is the pointer to the HMAC key data and buf is the pointer to the key value.  I'm unclear about the difference between these two.  So, buf stores the HMAC key?  What is the xmlSecKeyDataPtr data?
 
>From the API documentation, xmlSecKeyData is the following structure.  What is this "xmlSecKeyDataId" value?  Do I need to set it?
 
struct xmlSecKeyData {
    xmlSecKeyDataId			id;
    void*				reserved0;
    void*				reserved1;
};
 
 
Thanks for your help,
Monica
 
 
 
>Probably you need this function:

>crypto.html#XMLSECOPENSSLKEYDATAHMACSET">http://www.aleksey.com/xmlsec/api/xmlsec-openssl->crypto.html#XMLSECOPENSSLKEYDATAHMACSET

>Aleksey

 
>Hi,

>I would like to sign a node with Hmac-sha1. With the key (already
>computed from a shared secret) in a char array (not as xmlSecKey) I
>construct the template I need before calling the signing function. My
>problem is that I am not able to load that key to the dsigCtx after
>creating the context and before calling xmlSecDSigCtxSign.

>This step might be easy but I haven't been able to do it after trying,
>reading the API reference and searching in mail lists.

>Thanks,
 >- -Guillermo


		
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20041008/23801ec7/attachment-0002.htm


More information about the xmlsec mailing list