[xmlsec] Nodes in X509Data

Pekka A peter.seclist at bastu.net
Fri Nov 19 09:53:47 PST 2010


I am trying to sign a XML file with xmlSecKeyDataFormatPkcs12 option, as 
the keys I use are stored in .p12 certificate file.
All this goes very good, execpt some differences in X509Data node 
content, compared to an acceptable XML result.

This far my output from LibXmlSec looks like this:

<X509Certificate>MIID+jCCAuKgAwxu...</X509Certificate> <- Get this, away!
<X509Certificate>MIID+jCCAuKgAwIB...</X509Certificate> <- This is GOOD!

As you can see, the X509Certificate has two nodes. There seems to be two 
keys in .p12 certificate file, and both of then get picked in here. How 
could I choose to include only the latter one of those Certificates?

The second different part is the X509IssuerSerial node. I should get the 
two above mentioned nodes 'X509IssuerName' and 'X509SerialNumber' added 
there. How could I first pick the values from inside the Certificate, 
and then add those two nodes to the XML structure?

I'm doing this with Delphi, and I have now stared several days 
libxmlsec.Pas Unit. I just can't figure how to call those needed 
functions. And get the few needed nodes created.

If I could see the answer written in C, I probably will understand how 
to do the calls in Delphi. Any comments appreciated.
Thanks for this great Crypto library.

Pekka A.

More information about the xmlsec mailing list