[xmlsec] How to get Certificate from signed xml file

Jürgen Heiss jheiss at Mesonic.com
Tue May 2 23:49:16 PDT 2006

Hi Aleksey,

Well now I got my Certificate from signed xml ;o)
Using the following code.

key = dsigCtx.signKey;
    size = xmlSecPtrListGetSize(key->dataList);
	sdata = (*((dsigCtx).signKey)).dataList;
    for(pos = 0; pos < size; ++pos) 
		tmp = (xmlSecKeyDataPtr)xmlSecPtrListGetItem(key->dataList, pos);
		if((tmp != NULL) && (tmp->id == sdata->id)) 
		    return(xmlSecPtrListSet(key->dataList, data, pos));

But I still don't find a way the export this certificate to my local machine for example c:\mycert.cer.

Thanks for any help

-----Original Message-----
From: Aleksey Sanin [mailto:aleksey at aleksey.com] 
Sent: Dienstag, 02. Mai 2006 17:45
To: Jürgen Heiss
Cc: xmlsec at aleksey.com
Subject: Re: [xmlsec] How to get Certificate from signed xml file

> Well i find my certificate, but how to export now?

I believe you found the key, not certificate. Look at KeyData objects in this key.


More information about the xmlsec mailing list